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

질문됨 2년 전2069회 조회
1개 답변
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
전문가
답변함 2년 전
  • how can I apply that to my project?? I don't want to restart my project

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인