Open avvi00 opened 3 years ago
keep in mind that serverless lambda can't connect to the Internet unless you configured run within your VPC and has NAT gateway.
Did you resolve this? I'm running into the same exact issue with public.ecr.aws/lambda/dotnet:6
and newer versions of Chrome and ChromeDriver. It works locally, but I get the same exact error when running in my Lambda:
[SEVERE]: CreatePlatformSocket() failed: Address family not supported by protocol (97)
I verified that it's not a networking issue by successfully hitting the same exact endpoint with an HttpClient.GetAsync(...)
call.
Hello,
Thank you for providing these base images.
I've created a custom image from public.ecr.aws/lambda/dotnet:core3.1.2021.06.02.11 for my lambda function.
My issue is that the function runs successfully on my local docker, but when its deployed to AWS lambda it fails.
The function simply creates a Chrome webdriver and tries to open a page. As mentioned it runs perfectly on my local docker (multiple continuous invocations), but when deployed as a Lambda, it fails with the following error:
Is there some sort of constraint in terms of opening ports etc, that is not present in the base image but is there in the AWS cloud container sandbox?
Docker version: v20.10.5 Platform: Windows 10
I have attached my full source code.
Instructions
Local run
Extract the zip
This will return "Google"
AWS run
Now deploy the image into a new ECR repository (called my-repo for example):
Create a new lambda function from the image:
Run the lambda:
lambda-selenium-docker.zip
Why is the same error not occurring in the locally deployed container?
Thanks Avner