Skip to content
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

Getting a 502 Bad Gateway response during the local testing of the container based lambda #37

Open
skulkarni56-bb opened this issue May 28, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@skulkarni56-bb
Copy link

I am following the example here https://pypi.org/project/awslambdaric/ . When I run the curl command to test the lambda I get no response. With the increased verbosity in the curl command I get the error 502 Bad gateway. The peculiar thing is that sending curl command again hangs - with the last message being "upload completely sent off: 2 out of 2 bytes". A standard docker nginx test works fine (something similar to https://www.docker.com/blog/how-to-use-the-official-nginx-docker-image/)

@jonife
Copy link

jonife commented Jul 2, 2021

Hello @skulkarni56-bb, sorry this issue was not picked up earlier, let us know if you already fixed this issue.
This is a behavior that could happen when the image used is not totally compatible with Lambda (or it doesn't have the right entrypoint), so we would like to ask for more information to further understand the issue
1 Did you use the Dockerfile specified in the RIC instructions from the link you provided?
2 Did you build that Dockerfile first and added its name:tag to the docker run command?
3 If you used a different Dockerfile, what file did you use?
Thank you,

@CommonCrisis
Copy link

CommonCrisis commented Nov 3, 2021

Hi, I have the same issue with using the public.ecr.aws/lambda/python:3.8 image.
I can visit http://localhost:9000/2015-03-31/functions/function/invocations with my browser but I cannot Post to the endpoint - it just keeps on going forever:

* Connected to localhost (127.0.0.1) port 9000 (#0)
> POST /2015-03-31/functions/function/invocations HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.75.0
> Accept: */*
> Content-Length: 2
> Content-Type: application/x-www-form-urlencoded
>
} [2 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 Connection Established
< Proxy-Agent: Ztunnel/1.0
* no chunk, no close, no size. Assume close to signal end
*

@ghost ghost added the bug Something isn't working label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants