I have an API Gateway, integrated to a Step Function, inside a VPC.
When I hit the endpoint the step function is successfully executing, but it's still replying with:
500 Internal Server Error
{
"message": "Internal server error"
}
Everything is setup in terraform, have tried setting up a response in terraform and on the console but both aren't working.
screenshot: https://pasteboard.co/Kikasjb.png
note, looked at this post: AWS API Gateway - Lambda - Internal Server Error
It's similar but there the reply is around a lambda returning a value, but this step function is asynchronous so not sure how something gets send back here. Thanks!
I discovered my issue was that when settings in the API Gateway in the console I have to redeploy the API gateway before being able to test the change.
Related
I am trying to use AWS Lambda function with API gateway endpoint as weebhoks. The problem is that after a few requests I get 500 (or sometimes 503) errors. In Cloudwatch I can see that the request does not even trigger Lambda. So API gateway throws the errors. If I am waiting a short time then it everyhting is working fine again.
In Cloudwatch of API gateway I can only see the error status, no more.
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!
If your API is working properly with the test button, but, you are receiving this error, looks like your API is not deployed.
To deploy your API go to Actions > Deploy API:
I'm developing several AWS serverless applications using Lambda and API gateway.
At one point, I tried to execute an API request on one application (using requests python lib) from code running inside a Lambda function in another application. I get 500 server error. From the logs it appears that the Lambda function behind the API gateway is not starting at all. I don't find any logs that can tell me what happened.
Additional details:
The API gateway is protected by IAM auth.
The calling lambda has permission to "execute_api"
The request is signed according to Signature V4 - I followed the example here: https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html#sig-v4-examples-post .
The issue was that the calling lambda needed permission to execute the second lambda behind the API gateway. I don't know why that is. I also still don't know how I should have debugged this - where are the logs that should tell me what was the issue. Eventually it was a lucky guess on my side.
I have an API Gateway endpoint that proxies a Lambda function. When I test the endpoint in the console (a GET request), it works fine and returns the correct JSON.
When I try the same endpoint in the browser or Postman, it doesn't work. The error is:
server IP address could not be found
I have logs set up in CloudWatch for the API and nothing comes up, so it looks like the API is not even getting called.
I'm using the serverless framework with NodeJS. I've tried deleting my whole CloudFormation stack and redeploying from scratch but it didn't make a difference. The API was working fine until today.
I'm having the exact same issue. Specificially, Starbucks wifi doesn't like AWS API Gateway endpoints but quite a few other public wifi too. The solution is to use custom domain for the API Gateway endpoints, I'm afraid
I created an API using AWS API gateway and deployed it following the steps similar to the tutorial for AWS API gateway. I Connected the API with AWS lambda function on the backend. Everything works fine from inside API gateway's test method but when I access the API from Postman, I get the following error
"message": "Signature expired: 20160917T171647Z is now earlier than 20160917T200334Z (20160917T200834Z - 5 min.)"
Searching on stackoverflow question
AWS SDK Error - Signature not yet current
says it may be a problem with system timing. As I am using AWS lambda and API gateway, I don't have control of the system time. What should I debug?
Figured out the solution. The error message is misleading. I was not accessing the full url to the API.
I was accessing something like
https://someChars.execute-api.us-west-2.amazonaws.com/prod/
while the full url is
https://someChars.execute-api.us-west-2.amazonaws.com/prod/myUrlName