Skip to content

Commit c2d89e6

Browse files
committedSep 16, 2019
cleanup and update
1 parent 554a49e commit c2d89e6

File tree

4 files changed

+38
-18
lines changed

4 files changed

+38
-18
lines changed
 

‎README.md

+21-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
# AWS Layer for Lambda functions
1+
# AWS Layer for [Sharp](https://sharp.pixelplumbing.com/en/stable/)
22

3-
[Sharp](https://sharp.pixelplumbing.com/en/stable/) js as a layer,
3+
## How to Use this layer
44

5-
## Image copyright
5+
Either check the `example` folder and follow the instruction on [how to run the example](#how-to-run-example) or in your Lambda console add following ARN
6+
`arn:aws:lambda:eu-west-1:502686283826:layer:sharp:7`
67

7-
`lucky.jpg` is owned by me
8+
This is last stable version.
9+
10+
## Deploy and build the layer yourself
11+
12+
### Building the layer
13+
14+
Docker must be installed.
15+
Run `docker-compose up --build` in the root of the project. After that you will get the zip file under `layers/sharp/out`. I'm not sure why would you do it, since last version is already provided and sharp hasn't seen any major changes in a while.
16+
17+
### Deploying
818

9-
## Running the example
19+
Again, from root of the project run `yarn deploy`
20+
21+
## How to run example
1022

1123
```bash
1224
cd example
13-
1425
yarn
1526
yarn start
1627
```
@@ -20,3 +31,7 @@ Then visit the following link
2031
[http://localhost:4000/sharp?width=800&metadata=true&convolve=true](http://0.0.0.0:4000/sharp?width=800&metadata=true&convolve=true)
2132

2233
to deploy run `yarn deploy` from the `example` folder
34+
35+
## Image copyright
36+
37+
`lucky.jpg` is owned by me

‎docker-compose.yml

-9
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,3 @@ services:
77
dockerfile: Dockerfile
88
volumes:
99
- ./layers/sharp:/app
10-
deploy:
11-
image: woss/aws-sharp-layer-test
12-
build:
13-
context: ./example
14-
dockerfile: Dockerfile
15-
volumes:
16-
- ./example:/app
17-
env_file:
18-
- ./.env

‎example/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"name": "aws-lambda-layer-sharp",
2+
"name": "aws-lambda-layer-sharp-example",
3+
"repository": "git@github.com:woss/aws-lambda-layer-sharp.git",
34
"version": "1.0.0",
45
"main": "src/handler.js",
56
"license": "MIT",
@@ -18,10 +19,10 @@
1819
"scripts": {
1920
"start": "nodemon -w ./src/**/* --exec \"yarn offline\" ",
2021
"offline": "sls offline start",
21-
"deploy": " sls deploy"
22+
"deploy": "sls deploy"
2223
},
2324
"keywords": [],
24-
"author": "",
25+
"author": "Daniel Maricic <daniel@woss.io>",
2526
"description": "",
2627
"dependencies": {}
2728
}

‎package.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "aws-lambda-layer-sharp",
3+
"version": "1.0.0",
4+
"repository": "git@github.com:woss/aws-lambda-layer-sharp.git",
5+
"author": "Daniel Maricic <daniel@woss.io>",
6+
"license": "Apache",
7+
"dependencies": {
8+
"serverless": "^1.52.0"
9+
},
10+
"scripts": {
11+
"deploy": "sls deploy"
12+
}
13+
}

0 commit comments

Comments
 (0)
Please sign in to comment.