429 - Too Many Requests

1

We have a .net lambda function connected to an API Gateway. This has been working fine for several weeks but all of a sudden this morning I am getting Too Many Requests errors. I have no idea why. Our app is still in development so has not been hit with very light traffic.

At first we were getting what was manifesting itself as CORS errors in the browser. It worked in Postman so that lead us to believe there was suddenly a CORS error but looking at headers there was the header:

x-amzn-errortype: LimitExceededException

At this point it was still working in Postman but about an hour later it stopped working in Postman too. (That is where I saw the 429 error). I also saw a similar error (Too Many Requests) pop up in the AWS console too when I was attempting to delete a custom domain name that we were no longer using. I tried again and it did delete.

  1. What is going on?
  2. How long do 429 errors last for?
  3. Will it just reset itself?

Thanks

zeiddev
已提問 3 年前檢視次數 2452 次
1 個回答
0

I wanted to report how I solved this in case somebody else should have this issue.

There was a usage plan in place for this API. (in API gateway, under Usage Plans). For my API there was a quota set up of 5000 hits per month. This was hit and we got the 429 errors. Given that this is an internal API we have removed the monthly quota limit.

What we noticed when we looked at the logs was that there was over 1000 hits within five minutes yesterday evening. I am not sure why this would have happened other than it was a brute force attack against the endpoint. We have now added an API key requirement to it, in the hope that this will prevent this kind of attack.

zeiddev
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南