How to install Puppeteer on lambda?

0

Hi I need to install puppeteer on lambda, but I don't know how, I saw videos, but their projects are deferent than mine. I tried installing chrome-aws-lambda on my local project and then push it, but I get this Error:

"errorMessage": "Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (901912).",

this is my package:

{
  "name": "name",
  "version": "2.0.0",
  "description": "Lambda function generated by Amplify",
  "main": "index.js",
  "license": "Apache-2.0",
  "devDependencies": {
    "@types/aws-lambda": "^8.10.92",
    "@types/puppeteer": "^5.4.6"
  },
  "dependencies": {
    "chrome-aws-lambda": "^10.1.0"
    "puppeteer-core": "^10.1.0"
  }

How can I install correctly puppeteer on lambda? thnk you

asked 2 years ago2042 views
1 Answer
0

Puppeteer can now be packaged as a container image in a Lambda function to perform browser automation or any web scraping functionality.. This blog post may help you , Scaling Browser Automation with Puppeteer on AWS Lambda with Container Image Support - https://aws.amazon.com/blogs/architecture/field-notes-scaling-browser-automation-with-puppeteer-on-aws-lambda-with-container-image-support/

profile pictureAWS
EXPERT
answered 2 years ago
  • how can I apply that to my project?? I don't want to restart my project

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions