Rate Limiting in AWS API Gateway
Hello! I need to implement rate limiting for some of my API Gateway endpoints that have lambda proxy integrations.
As a result of the proxy integrations, and because I would like to include a "Retry-After" header, I need to include the rate limiting logic in my lambda itself - I can't do it on the API gateway level.
Currently I am thinking of selecting the count of requests from the client in the last 60 seconds from my database and applying rate-limiting based on that.
However, I'm not sure if there is a better way of approaching this/whether this is a generally cursed approach. Would anyone be able to provide some more insight?
0 Replies