- Newest
- Most votes
- Most comments
I finally figured out what was happening!!!
I inadvertently created an infinite loop which was taking up so many resources that it interfered with the API Gateway's ability to process all requests.
How did I create an infinite loop? I had a lambda that was triggered by an ObjectCreated event in an S3 bucket, the big problem was that the lambda wrote a new file to that same bucket which then started the process over again. Infinitely. (I fixed it with one line of code. :))
So if anyone else is having a problem with intermittent 503's on the API Gateway, maybe check if any of your backend processes might be creating an infinite loop and thus taking away processing power from the API Gateway. I'm a little embarrassed, of course, but if it helps someone else in the future, it will be worth it.
Are there logs in Cloudtrail? Did you enable execution and access logs for API GW/stage?
Relevant content
- asked 9 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
Thank you for responding.
I ended up reverting back 3 versions of my backend code and then redeploying it one at a time looking for any indications of the problem. I got the code all back to the present version and I do not see the problem anymore. I will keep monitoring it. But it looks fixed...