Failing to connect to Chrome within Docker container on Lambda
We are trying to launch and connect to an instance of Google Chrome within a custom Docker container Lambda runtime. It runs locally 100% fine using Runtime Interface Emulator.
We think it may be due to a difference in the Docker config when running it on Lambda compared to locally, preventing our runtime from accessing
localhost. We've tried many different suggestions instead of
localhost and also tweaked the network settings on the Docker image, but with no luck.
On line 37
remoteInterface() can also take a host as well as a port, but it defaults to
localhost. We have tried
http://host.docker.internal and a bunch of other suggestions including using Lambda's env variables to get the IP of container at runtime.
Has anyone had similar problems or know of anything we should look into?
When you use a container image to package your lambda, the container is used only for packaging. It still runs the lambda like it would if your lambda was packaged as a zip file.
Having said that, I am not sure if this is going to be helpful, but there is an example of a browser from a lambda here - https://acloudguru.com/blog/engineering/serverless-browser-automation-with-aws-lambda-and-puppeteer
Thank you Indranil, we will have a look into your suggestion
Running TagUI RPA as a Lambda Functionasked 4 months ago
Deploying python flask app on aws lambda containerasked 18 hours ago
Lambda Container-Based Function Needs --privileged and --device /dev/fuseAccepted Answerasked 11 days ago
docker container crashingasked 3 years ago
Lambda function working locally but crashing on AWSasked 5 months ago
Does Lambda not support multi-architecture container images / manifests?asked 4 months ago
Can't connect to an RDS Instance from Lambda (different account tough)asked 2 years ago
Getting AWS Credentials into a Docker Container without Hardcoding Itasked 11 hours ago
Failing to connect to Chrome within Docker container on Lambdaasked 20 days ago
Lambda function from container - Missing Parent Directoryasked 6 months ago