I am building an Android application whose back end is in python which runs as an AWS Lambda function. The invocation type is RequestResponse. Sometimes the app fails to invoke the Lambda function. What I can't figure out is how to get the specific error returned by the function in the response and log it. All I get is the type of error which is "Unhandled". Please help.
1
votes
3 Answers
1
votes
If the Monitoring tab in the AWS Lambda function does not show any executions, then it sounds like the invocation is failing or being denied.
You could look at the AWS CloudTrail logs to see how the request was received and handled.
If nothing is showing in CloudTrail, then your request never made it to AWS or was rejected before processing (eg out-of-date credentials?).
0
votes
Sounds like an escaping exception. Just make sure you catch it then present the details in your response payload.
We use this little tool to test our Python lambdas. It will help you figure out the exception. If you use it with the rest of the BST Tools you can expose the lambda even on the internet while running it locally in your IDE.