chrome-aws-lambda-layer | 43 MB Google Chrome to fit inside AWS Lambda Layer | Cloud Functions library
kandi X-RAY | chrome-aws-lambda-layer Summary
kandi X-RAY | chrome-aws-lambda-layer Summary
43 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of chrome-aws-lambda-layer
chrome-aws-lambda-layer Key Features
chrome-aws-lambda-layer Examples and Code Snippets
Community Discussions
Trending Discussions on chrome-aws-lambda-layer
QUESTION
I am currently using the following Puppeteer AWS Lambda Layer to scrape 30 URLs and create and save screenshots in S3. At the moment, I send 30 individual payloads therefore running 30 AWS Lambda functions. https://github.com/shelfio/chrome-aws-lambda-layer
Each JSON payload contains a URL and an image file name that are sent every 2-3 seconds to API Gateway via a POST request. The first 6 or 9 Lambda functions in the list seem to run fine, then they start to fail with Navigation failed because browser has disconnected!
as reported in AWS Cloudwatch.
So I am looking for an alternative solution, How could I edit the code below to batch screenshot a set of 30 URLs, by handling a single array of JSON payloads? (eg. For loop etc)
Here is my current code for generating individual AWS Lambda screenshots and sending to S3:
...ANSWER
Answered 2020-Aug-23 at 03:42I tried to replicate the issue and modify the code to use loop.
While working on this issue, I found several things worth pointing out:
- the lambda requires a lot of RAM (at least 1GB in my test, but more better). Using small amount of RAM lead to failures.
- lambda timeout must be large to handle a number of URLs to screenshot.
- your
img
from the JSON payload is not used at all. I did not modify this behavior, as I don't know if this is by design or not. - similar errors to yours were observed when running async for loop and/or not closing pages opened.
- modified return value to output an array of s3 urls.
- undefied URL
Here is the modified code that worked in my tests using nodejs12.x
runtime:
QUESTION
I'm getting started with nodejs and the serverless framwork.
My handler.js contains:
...ANSWER
Answered 2020-Jun-05 at 18:41Let me explain here. Serverless framework can invoke(run) lambda in two ways(locally and in cloud-AWS). It seems you are trying to invoke lambda in AWS. (arn:aws:lambda:us-east-1:155754363046:function:sellthelandnow-dev-hello) Basically this arn does not exist in your AWS-155754363046 account. you need to use
QUESTION
I'm getting started trying to write a lambda function with node and puppeteer. I'm using the serverless framework
I've been trying to follow https://codissimo.sinumo.tech/2019/12/27/serverless-puppeteer-with-aws-lambda-layers-and-node-js/ to utilize the provisioned chrome at https://github.com/shelfio/chrome-aws-lambda-layer . My function is working as expected locally.
my handler.js contains:
...ANSWER
Answered 2020-May-31 at 20:35These are accessible in CloudWatch logs.
If you access in the region you execute the Lambda in it should have a log group of /aws/lambda/functionname.
Then a stream of the save revision
QUESTION
I'm getting started trying to write a lambda function with node and puppeteer. I'm using the serverless framework
I've been trying to follow https://codissimo.sinumo.tech/2019/12/27/serverless-puppeteer-with-aws-lambda-layers-and-node-js/ to utilize the provisioned chrome at https://github.com/shelfio/chrome-aws-lambda-layer . My function is working as expected locally.
My Yaml file contains:
...ANSWER
Answered 2020-May-29 at 22:20There is a space in your layer ARN.
Your config in YAML:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install chrome-aws-lambda-layer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page