How to Set Up a Shared Rate Limit for Multiple API Keys in AWS?

June 23, 2025 2 answers
Asked by CuriousCoder42
I'm trying to figure out how to implement a system where a group of API keys shared by different clients have a combined usage limit—like 10,000 requests per day across all keys. The challenge is that AWS API Gateway enforces usage limits individually on each key and doesn't provide a way to group them under one quota. Has anyone found a solution for this on AWS? Should we consider switching to other options like Kong or Apigee, or is there a viable workaround within AWS? By the way, we're hosting our backend on Amazon ECS, so self-hosted solutions like Kong are on the table. I'm just wondering if it's worth the effort or if there's a simpler approach available.

Answers

Techwhiz101
It sounds like a tough situation since AWS imposes limits per key. I wouldn’t want to be in a position where one client's usage impacts another's. Have you thought about creating your own rate limiter? It could give you the flexibility you need without switching platforms.
Reply to this answer
ApiFanatic88
You could indeed set up your own rate limiter. I was thinking you might implement this in a Lambda Authorizer for the API Gateway. That way, you can track requests and ensure the total doesn’t exceed your limit. It might take some additional work but could really help manage the combined quota.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions