-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Doesn't work with Lambda in Docker locally #309
Comments
I get the same error. |
You're missing the request context. I got this to work: import requests
json = {
"version": "2.0",
"routeKey": "GET /",
"rawPath": "/",
"pathParameters": {},
"requestContext": {
"http": {
"sourceIp": "192.0.0.1",
"path": "/",
"method": "GET"
}
}
}
r = requests.get(url="http://localhost:9000/2015-03-31/functions/function/invocations", json=json)
print(r.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't manage to get Mangum to work with AWS Lambda in Docker. Everything works if I just run it as a Python process, but not in Docker container.
Error:
I'm also getting the same error when I deploy on AWS Lambda.
My server:
Dockerfile:
I run it as
docker run -p 9000:8080 prediction_lambda
. I want to deploy this as Lambda Function URL, which uses API Gateway 2.0 style requests. My request:So I'm tring to reach at least the
/
endpoint with GET to debug this, but eventually for production I want to use the POST method.How can I fix this?
The text was updated successfully, but these errors were encountered: