AWS API Gateway: Error 429 Too many requests

I am trying to create a server system with AWS API Gateway and Lambda .
In the past days, I created the PUT method for a new API resource, with an API key as a simple first security step. The PUT method calls the Lambda function on AWS.
Then I deployed this API at the prod stage for some tests.

In the early days, everything worked well as expected . I created an API call with a postman and I got all the data that I was expecting. But a couple of days ago, I always started to get the answer "Too many requests" 429 . I also created a new stage, but nothing has changed: and a new stage, with the same version or with a newer version, will always be the same error.
The API does not reach any restrictions, because they are called 4 or 5 times a day , but not per second (tested on CloudWatch). No loop, this is just one challenge. I believe there is no error on the lambda side, because if I test the API in the AWS API Gateway console, I will not get an error (and the lambda worked well in the past, no new changes from this version). The error only shows when I use an external client to check my api (in my case it is Postman).

Can anyone help solve this problem?

UPDATE: I just created a POST method on the same resource, with the same parameters and the same lambda. It works. I wonder if the problem is related to the PUT methods at all or if within two days my POST method will be affected by the same problem.

+5
source share
2 answers

I had the same problem. I deleted and recreated the deployment. This worked in my case.

+4
source

Here is a link to errors related to the Amazon API Gateway. The last paragraph contains additional information about error 429, which you mentioned above.

0
source

Source: https://habr.com/ru/post/1245012/


All Articles