Skip to content

API Gateway Rate Limiting

0

We are using API Gateway Rate Limiting using Usage Plan 10 req/sec per API Key. There is an AuthLambda associated with the API Gateway.

We see an API Key is able to make ~70 req/sec which get to our AuthLambda. Does this point to something we missed in set up? Or is a weakness being exploited?

The issue is not widespread (primarily one API Key client is doing it regularly).

Thanks for any insight.

Todd.

asked 2 years ago279 views

1 Answer
1

Auth Lambda is invoked before rate limiting. Could it be that you disabled the cache for the auth response from Lambda? Maybe you are using a header as the input for the auth Lambda that has different values in each invocation?

AWS
EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Thanks...I was thinking Auth was after Rate Limit, but makes sense to save AWS resources to Rate Limit validated requests. Given that, and we cache creds for 1 minute, I think they are hitting us hard right when cache is cleared and we're re-authing on new requests (which are also beyond rate limit). I'll dig around API Gateway to see if they are getting rate limited after we cache re-auth. I expect they are getting 429s at that point (after first 10 reqs). And, likely getting 429s before the cache cleared given the heavy load they are sending. Thanks again.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.