From 86264e7733ee6b0112272f863431cc8347c1a54d Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 24 Feb 2020 20:31:17 +0000 Subject: [PATCH] Docs: update Lambda section to use Node.js 12 --- docs/install.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/install.md b/docs/install.md index 8fdbd22c..2e27ba7d 100644 --- a/docs/install.md +++ b/docs/install.md @@ -129,24 +129,24 @@ to `false` when using the `yarn` package manager. ## AWS Lambda -Set the Lambda runtime to `nodejs10.x`. +Set the Lambda runtime to `nodejs12.x`. The binaries in the `node_modules` directory of the -[deployment package](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-create-deployment-pkg.html) +[deployment package](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-package.html) must be for the Linux x64 platform. On machines other than Linux x64, such as macOS and Windows, run the following: ```sh rm -rf node_modules/sharp -npm install --arch=x64 --platform=linux --target=10.15.0 sharp +npm install --arch=x64 --platform=linux --target=12.0.0 sharp ``` Alternatively a Docker container closely matching the Lambda runtime can be used: ```sh rm -rf node_modules/sharp -docker run -v "$PWD":/var/task lambci/lambda:build-nodejs10.x npm install sharp +docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm install sharp ``` To get the best performance select the largest memory available.