Created
October 24, 2019 20:05
-
-
Save pepoviola/1816780c01954cb0fda178380caafe14 to your computer and use it in GitHub Desktop.
Add Google Chrome for AWS Lambda as dependency in your function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Google Chrome for AWS Lambda as dependency in your function. | |
# based on https://github.com/alixaxel/chrome-aws-lambda#aws-lambda-layer | |
nvm use lts/dubnium | |
mkdir -p node_modules/chrome-aws-lambda/ | |
npm install lambdafs@~1.3.0 puppeteer-core@~1.20.0 --no-bin-links --no-optional --no-package-lock --no-save --no-shrinkwrap | |
npm pack chrome-aws-lambda | |
tar --directory node_modules/chrome-aws-lambda/ --extract --file chrome-aws-lambda-*.tgz --strip-components=1 | |
rm chrome-aws-lambda-*.tgz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment