Lambda API Triggers shows "Internal Server Error"

0

I have created an API trigger and a GET route for a lambda function which returns a simple "Hello World" response. However, when I click on the API endpoint URL it takes a long time, approximately 5 minutes until the browser shows {"message":"Internal Server Error"}.

Image 1: Lambda API Trigger Image 1: Lambda API Trigger Image 2: API Route Image 2: API Route Image 3: CloudWatch Log Image 3: CloudWatch Log Image 4: API URL Response Image 4: API URL Response

Please advice what configurations am I missing here?

2 Answers
1
Accepted Answer

Hello.

An error will occur if there is a problem with the Lambda function's resource-based policy or if the Lambda function does not return the specified response format.
I recommend using log variables to see more details.
https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-troubleshooting-lambda.html

profile picture
EXPERT
answered 13 days ago
profile picture
EXPERT
reviewed 13 days ago
profile pictureAWS
EXPERT
reviewed 13 days ago
1

Hi,

Please, check your CloudTrail logs to get last API calls (possibly done by Lambda) to see if some of them fails and how they fail. It may be more precise than 500 to understand the root cause of your problem.

Best,

Didier

profile pictureAWS
EXPERT
answered 13 days ago
profile picture
EXPERT
reviewed 13 days ago