Let's say I am running a serverless REST API in AWS. I therefore have my REST API implemented in an AWS lambda and the lambda is exposed over HTTP using an API Gateway or an Application Load Balancer. Then, I want to protect my API from potential hackers that use too intensively my API. I therefore want to limit the API calls frequency by IP address of caller.
I see that this can be done with AWS WAF using a rate based rule. When reading the documentation, the minimum threshold is 2000 calls by 5 minutes. This is about 7 calls by second. This is a little too big for our standards. Furthermore, it is not possible to specify a limit by minute, hour, day, etc. So it is pretty limited.
Are there any other alternative than AWS WAF rate based rule to achieve IP based rate limiting?