File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,17 @@ A pre-built layer zip file is available on the [Releases page](../../releases),
18
18
```
19
19
1. Install dependencies:
20
20
` ` ` shell script
21
- docker run -v " $PWD " :/var/task lambci/lambda:build-nodejs12.x npm --no-optional --no-audit --progress=false install
21
+ docker run -v " $PWD " :/var/task --entrypoint npm public.ecr.aws/lambda/nodejs:18 --no-audit --progress=false --arch=x64 --platform=linux ci
22
22
` ` `
23
23
1. Build the layer:
24
24
` ` ` shell script
25
- docker run -v " $PWD " :/var/task lambci/lambda:build-nodejs12.x node ./node_modules/webpack/bin/webpack.js
25
+ docker run -v " $PWD " :/var/task --entrypoint node public.ecr.aws/lambda/nodejs:18 ./node_modules/webpack/bin/webpack.js
26
26
` ` `
27
27
1. Perform a smoke-test:
28
28
` ` ` shell script
29
- docker run -w /var/task/dist/nodejs -v " $PWD " :/var/task lambci/lambda:build-nodejs12.x node -e " console.log(require('sharp'))"
29
+ docker run -w /var/task/dist/nodejs -v " $PWD " :/var/task --entrypoint node public.ecr.aws/lambda/nodejs:18 -e " console.log(require('sharp'))"
30
30
` ` `
31
31
1. Import created layer into your AWS account:
32
32
` ` ` shell script
33
- aws lambda publish-layer-version --layer-name sharp --description " Sharp layer" --license-info " Apache License 2.0" --zip-file fileb://dist/sharp-layer.zip --compatible-runtimes nodejs12 .x
33
+ aws lambda publish-layer-version --layer-name sharp --description " Sharp layer" --license-info " Apache License 2.0" --zip-file fileb://dist/sharp-layer.zip --compatible-runtimes nodejs14.x nodejs16.x nodejs18 .x
34
34
` ` `
You can’t perform that action at this time.
0 commit comments