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

gefragt vor 2 Jahren2068 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 2 Jahren
  • how can I apply that to my project?? I don't want to restart my project

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen