Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda function sometimes shows {"message": "Internal server error"}

so I have a situation where I have a lambda function written. So everything is working perfectly fine. All of a sudden when I run my end to end test making multiple http requests to api gateway , which invokes my lambda, I end up with

{"message": "Internal server error"}

Now this happens for a few minutes (very random). A few minutes later My lambda function starts to work when I invoke it using my browser (api-gateway). In cloudwatch logs I just get this log output below

END RequestId: a31629a2-81ae-46a2-8836-7fcd0f91edda

Not really a detailed explanation as to why its happening. I know theres nothing wrong with my code possibly, since I do get successful responses.

like image 500
The Coder Avatar asked Mar 17 '26 12:03

The Coder


1 Answers

In my case, the scenario is the same; no logs are printing in AWS Lambda. Then it is most likely a timeout issue. Increase the timeout on the Lambda and see if CloudWatch logs an error.

After increasing the timeout, my issue got sorted.

enter image description here

like image 104
Akitha_MJ Avatar answered Mar 19 '26 02:03

Akitha_MJ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!