File tree Expand file tree Collapse file tree 6 files changed +4854
-0
lines changed Expand file tree Collapse file tree 6 files changed +4854
-0
lines changed Original file line number Diff line number Diff line change 1+ .idea /
2+ coverage
3+ node_modules /
4+ dist /*
5+ ! dist /sharp-layer.zip
6+ * .iml
7+ .DS_Store
Original file line number Diff line number Diff line change 1+ # AWS Sharp layer
2+ This aws lambda layer contains a pre-built [ sharp] ( https://www.npmjs.com/package/sharp ) npm library.
3+ The built lambda zip file is available in [ ` dist/sharp-layer.zip ` ] ( ./dist/sharp-layer.zip ) .
4+
5+ # Building
6+
7+ ## Dependencies
8+ * Docker
9+
10+ ## Steps
11+ 1 . Clone the repo:
12+ ``` shell script
13+ git clone git@github.com:Umkus/lambda-layer-sharp.git
14+ cd lambda-layer-sharp/
15+ ```
16+ 1. Install dependencies:
17+ ` ` ` shell script
18+ docker run -v " $PWD " :/var/task lambci/lambda:build-nodejs12.x npm ci
19+ ` ` `
20+ 1. Build the layer:
21+ ` ` ` shell script
22+ docker run -v " $PWD " :/var/task lambci/lambda:build-nodejs12.x node ./node_modules/webpack/bin/webpack.js
23+ ` ` `
24+ 1. Import created layer into your AWS account:
25+ ` ` ` shell script
26+ aws lambda publish-layer-version \
27+ --layer-name sharp --description " Sharp layer" \
28+ --license-info " Apache License 2.0" \
29+ --zip-file fileb://dist/sharp-layer.zip \
30+ --compatible-runtimes nodejs12
31+ ` ` `
You can’t perform that action at this time.
0 commit comments