DEV Community

Jordan Hansen
Jordan Hansen

Posted on • Originally published at javascriptwebscrapingguy.com on

1 1

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.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more