I am aware that we can set Lambda authorizer when reaching an API Gateway endpoint. I am also aware that we can set a policy that would allow to block some IP addresses (inside a list) for example.
I would like to build a system that would detect an abnormal number of calls to the same lambda by the same IP address and block this IP address because of this bad behavior.
How can i do this kind of logic / check from the lambda or the API Gateway automatically ?
Note : i am running my lambdas under python 3.9
Edit : I am using HTTP API Gateway and this seems to not be supported at the moment...