File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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),
1818 ```
19191. Install dependencies:
2020 ` ` ` 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
2222 ` ` `
23231. Build the layer:
2424 ` ` ` 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
2626 ` ` `
27271. Perform a smoke-test:
2828 ` ` ` 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'))"
3030 ` ` `
31311. Import created layer into your AWS account:
3232 ` ` ` 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
3434 ` ` `
You can’t perform that action at this time.
0 commit comments