Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I'm trying to create a backend system with AWS API Gateway and Lambda.

In the past days, I created a PUT method for a new API resource, with an API Key as a simple first security step. The PUT method invokes a Lambda function on AWS.

Then I deployed this API to a "prod" stage for some tests.

In the first days, everything was working well as expected: I created a call to the API with the postman and I received all the data I was expecting. But a couple of days ago I started to receive always the 429 "Too many requests" response. I created also a new stage, but nothing changed: also the new stage, with the same version or with the newer version, is getting always the same error.

The API is not reaching any limit, because they are called 4 or 5 times per day, not per second (checked on CloudWatch). There is no cycle, it is only a single invocation. I suppose there is no error on the lambda side because if I test the API in the AWS API Gateway console I get no error (and the lambda was working well in the past, no new changes from that version). The error only shows when I use an external client to test my api (in my case it is Postman). 

Can anyone help to solve this problem? 

I've just created a POST method on the same resource, with the same parameters and the same lambda. It is working. I wonder if the problem is related to the PUT methods in general or if within 2 days also my POST method will be affected by the same problem.

1 Answer

0 votes
by (44.4k points)

Deleting and recreating the deployment solved it. I think there should be another way, but this works!

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

Browse Categories

...