Chrome flags required in an Amazon Lambda Docker image
See original GitHub issueI’m almost done making Phantomas run in an AWS Lambda Docker image. But I have an issue with Chrome not launching at all. I found a few answers thanks to this project: https://github.com/alixaxel/chrome-aws-lambda
It looks like Chrome requires to be started with the following additional flags: --no-sandbox --no-zygote --disable-gpu --single-process
.
I think this use case won’t be shared with many other Phantomas users and I don’t want to complexify Phantomas with some hard to understand options such as --no-sandbox
or --no-zygote
. Any idea how we could do that? Would a single --aws-lambda-compatibility
option be understandable/useful?
I still have the option to modify Phantomas’ code inside my Docker image.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Scraping without JavaScript using Chromium on AWS Lambda
It appears that Docker as configured within the runners provided by GitHub Actions do not native support building ARM images. However, you can ......
Read more >Running headful Chrome with extensions in a Lambda function
After a bit of tinkering, and a lot of googling, here are the flags I found necessary to run chrome-aws-lambda :
Read more >Creating Lambda container images - AWS Documentation
Create a container image for a Lambda function by using an AWS provided base image or an alternative base image.
Read more >alixaxel/chrome-aws-lambda: Chromium Binary for ... - GitHub
This package works with all the currently supported AWS Lambda Node.js runtimes out of the box. const chromium = require('chrome-aws- ...
Read more >Puppeteer performance in AWS Lambda Docker containers
It contains all flags needed to launch the browser and AWS X-Ray integration to measure performance. Building custom docker image for Lambda.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is possible, but it’s kind of annoying. We first need to provide one of those:
Then send it to AWS for deployment. And wait for deployment before testing.
Otherwise yes, I can add a specific variable on my environment.