AWS lambda function not identify the handler in FastAPI project #290
Unanswered
parth-patel97
asked this question in
Q&A
Replies: 2 comments
-
Any on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey @parth-patel97 Faced the same issue a couple of days ago and this PR helped me a lot, it seems to be a bug while trying to handle a proxy lambda, nothing about this is documented tho. Hope that helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I try to upload the FastAPI on the lambda function I get this error. Would anyone be able to help me with this?
My Porject structure :
README.md
main.py
requirements.txt
routes/api.py
src/dependencies/config.py
src/endpoints/textGenerator.py
My main.py :-
{
"errorMessage": "The adapter was unable to infer a handler to use for the event. This is likely related to how the Lambda function was invoked. (Are you testing locally? Make sure the request payload is valid for a supported handler.)",
"errorType": "RuntimeError",
"stackTrace": [
" File "/opt/python/mangum/adapter.py", line 76, in call\n handler = self.infer(event, context)\n",
" File "/opt/python/mangum/adapter.py", line 68, in infer\n raise RuntimeError( # pragma: no cover\n"
]
}
Beta Was this translation helpful? Give feedback.
All reactions