DEV Community

Jordan Hansen
Jordan Hansen

Posted on • Originally published at javascriptwebscrapingguy.com on

Getting Puppeteer working on Lambda.

Very frustrating slight echo in this video. Sorry!

Puppeteer on Lambda. Can it be done? Yes! I ended up using the chrome-aws-lambda package. It was still over the 50MB limit so I discovered that that limit does not apply when uploading from S3.

So I think the final workflow will be, upload to S3 and have that trigger an event to update the Lambda code.

Sweet!

After the video update. I was able to get it uploaded to s3 and then update the Lambda code all with one command. Here’s my package.json script:

"sendToLambda": "npm run zip && aws s3 cp function.zip s3://puppeteer-lambda-jordan && aws lambda update-function-code --function-name puppeteerTest --s3-bucket puppeteer-lambda-jordan --s3-key function.zip"
Enter fullscreen mode Exit fullscreen mode

The post Getting Puppeteer working on Lambda. appeared first on Javascript Web Scraping Guy.

Top comments (0)