Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invoking lambda from API gateway test, but hitting the endpoint does not invoke the lambda. 500 returned

I have an api gateway that triggers a lambda method. I'm trying to hit the endpoint and I get a 500 returned, InternalServerErrorException. However, the lambda was never invoked.

When logging into the aws console, I run the test interface in the api gateway. I get a 502, InternalServerErrorException. Logs say the lambda timed out after 3 seconds. Viewing cloudwatch it's clear the lambda was invoked this time.

I can't find any documentation on why I would be getting a 500 InternalServerErrorException when hitting the endpoint and it would not invoke the lambda, but I would be able to invoke it with the test button.

Any help would be greatly appreciated. I've been struggling for a bit with this one. Thanks!

like image 956
cWerning Avatar asked Oct 18 '25 19:10

cWerning


1 Answers

If your API is working properly with the test button, but you are receiving this error, it looks like your API is not deployed.

To deploy your API, go to Actions > Deploy API:

enter image description here

like image 56
valdeci Avatar answered Oct 20 '25 09:10

valdeci



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!