question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chrome flags required in an Amazon Lambda Docker image

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
gmetaiscommented, Mar 22, 2021

I’m wondering if we can automatically test phantomas in lambda somehow.

It is possible, but it’s kind of annoying. We first need to provide one of those:

  • a zip file that includes the entire project, including dependencies compiled for Lambda machines
  • a built docker image running on “Amazon Linux”

Then send it to AWS for deployment. And wait for deployment before testing.

1reaction
gmetaiscommented, Mar 22, 2021

Otherwise yes, I can add a specific variable on my environment.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found