serverless is used to simplify the deployment on AWS
chrome-aws-lambda is Chromium Binary for AWS Lambda and Google Cloud Functions. This package is versioned based on the underlying puppeteer minor version.
aws-sdk is used to upload result on s3 bucket.
You can install serverless globally or for this project up to you.
# Install the serverless cli
npm install -g serverless
# Or, update the serverless cli from a previous version
npm update -g serverless
Clone this repo and then install chrome-aws-lambda
npm install chrome-aws-lambda --save-prod
Install also puppeteer version base on the chrome-aws-lambda version
npm install [email protected].* --save-prod
aws-sdk package to play with s3 bucket:
npm install aws-sdk --save-prod
and finally if you want to run it locally for testing you can add serverless-offline plugin
npm install serverless-offline --save-dev
Execute locally serverless lambda:
sls offline
Deploy Lambda:
sls deploy