Questions tagged [chrome-aws-lambda]
14 questions
6
votes
1 answer
Puppeteer 16.1.1 not working with chrome-aws-lambda 10.1.0 version
I am using puppeteer and chrome-aws-lambda to generate pdf in AWS Lambda, till recently it was working with nodejs 12.x, puppeteer v13.7.0 and chrome-aws-lambda v10.1.0.
Recently we updated nodejs to 16.x and puppeteer to 16.1.1 (Got Notification…

Maruti Jadhav
- 61
- 2
3
votes
0 answers
Puppeteer core not executing chromium binary from @sparticuz/chrome-aws-lambda
Trying to run puppeteer-core & @sparticuz/chrome-aws-lambda on a lambda function.
Error: Failed to launch the browser process!\n/tmp/chromium: /tmp/chromium: cannot execute binary file\n\n\nTROUBLESHOOTING:…
3
votes
1 answer
chrome-aws-lambda + lighthouse always results in Error: connect ECONNREFUSED 127.0.0.1:9222
Dockerfile
FROM public.ecr.aws/lambda/nodejs:12
COPY index.js package.json /var/task/
RUN npm install --save-prod
CMD [ "index.handler" ]
package.json
{
"name": "lighthouse2",
"version": "1.0.0",
"description": "",
"main":…

Tyler V.
- 2,471
- 21
- 44
2
votes
0 answers
Serverless Function looking for node_modules inside function directory instead of node_modules directory
I have created a serverless function for generating PDF, and I am using chrome-aws-lambda with puppeteer-core. But when I call chromium.puppeteer.launch, it throws following error:
Cannot find module…

thezeeshantariq
- 308
- 2
- 16
2
votes
0 answers
puppeteer very slow to launch on AWS Lambda in production
I have been working on this feature for work where we need to convert some html into pdf. So I'm using chrome-aws-lambda and puppeteer-core like in the most tutorials anyone can find…

m. savantfou
- 31
- 2
2
votes
0 answers
Socket hang up for chrome-aws-lambda with Lambda Runtime 10.x
I have below code
browser = await chromium.puppeteer.launch({
args: ['--no-sandbox', '--single-process', '--start-maximized', '--headless', '--window-size=1920,1080', '--disable-gpu','--disable-setuid-sandbox'],
executablePath:…

Chetan
- 61
- 6
1
vote
0 answers
The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. UPLOADING PDF Buffer to S3
I'm trying to upload a PDF generated with chrome-aws-lambda in production and puppeteer in local. It works in local. But send the error of the title in production.
These are the params of presignedS3.
const pdf = await…

Acaedric
- 11
- 1
1
vote
1 answer
How to use chrome-aws-lambda module with AWS lambda functions?
I am trying to generate pdf from HTML using chrome-aws-lambda by node.js lambda function.
I created a Layer using this manual. Also, I tried to use existing layer with my function but I always get an error: Cannot read property 'puppeteer' of…

Volodymyr Zh
- 317
- 7
- 19
1
vote
1 answer
How to increase memory available for chromium in chrome-aws-lambda?
I collect the data using puppeteer and chrome-aws-lambda. I plan to push it to AWS Lambda but while testing locally I get an error:
Error: Protocol error (Runtime.callFunctionOn): Target closed.
when I call for waitForSelector.
I've some posts that…

Philipp Chapkovski
- 1,949
- 3
- 22
- 43
1
vote
0 answers
How to use chrome-aws-lambda for generating pdf from html in AWS lambda functions?
I was using puppeteer for generating pdf from html. It worked as expected in local machine. But on deploying to AWS lambda, we found that it will exceed the size limit of 250MB set by AWS for lambda functions. Then we got to know about…

Midhun Kumar
- 549
- 5
- 23
0
votes
0 answers
Is there a way to solve Flex box and newer css properties issue on chrome aws lambd?
We are generating PDFs within an AWS Lambda function using chrome-aws-lambda. Recently, we adopted the use of Flexbox, and we've encountered an issue where page breaking doesn't behave as expected; it gets abruptly cut off. However, when we preview…

Gurudeepak
- 372
- 2
- 14
0
votes
0 answers
Cannot find module '/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser
I was trying to run Puppeteer on an AWS Lambda function and got the following error.
Error: Error: Cannot find module '/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Browser'
This has happened on both locally and when I deploy it to AWS…

Harshana
- 5,151
- 1
- 17
- 27
0
votes
0 answers
Puppeteer in AWS Lambda: Error Target Closed or Timeout
I have an application that updates GitHub usernames via API and an attribute that is only accessible via UI.
The flow of the application is as follows:
user submits form > write to sheet > trigger: filter sheet & POST to lambda > lambda event:…

twesst
- 11
- 2
0
votes
1 answer
How AWS Lambda allocates CPU when concurrent lambda invoked?
I have one lambda function to test the URLs using puppeteer and chrome.
When I invoke 50 lambdas at the same time chrome is not able to load all the passed URLs.
What could be the reason for it?
I suspect it shares the CPU with time slicing.

Kaushal panchal
- 435
- 2
- 11