-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome flags required in an Amazon Lambda Docker image #914
Comments
Does AWS Lambda set any specific environment variable that we can detect and act accordingly (e.g. pass appropriate set of options to puppeteer when launching Chromium)? |
@gmetais - I assume you're trying to use "Container image" Lambda function? https://docs.aws.amazon.com/lambda/latest/dg/configuration-images.html#configuration-images-settings - an env variable can be set then - |
Good idea! Yes we can look at |
Otherwise yes, I can add a specific variable on my environment. |
Is this env variable set by the Amazon's Lambda stack for all lambdas? If so, let's use it - people can then use Phantomas server-lessly 😉 way easier - no need to set this yet another env variable that you need to remember about. @gmetais , can you prepare a pull request then? I'm wondering if we can automatically test phantomas in lambda somehow. |
https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime - it is set 🙂 So, let's use it. |
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. |
True, it's quite a complex procedure. Maybe as a nightly cron job? Let's consider it outside this thread. |
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.
The text was updated successfully, but these errors were encountered: