Reputation: 1
How can I prevent multiple lambda authorizers triggered at the same time by api gateway from the same user? It is happening because I’m doing multiple calls from the UI at the same time. The reason that I want to prevent the behavior is because I’m caching mechanism inside the lambda authorizer which I’m not really enjoying from because of that behavior
thanks everyone for a answer about this or any suggestions
Upvotes: 0
Views: 363
Reputation: 321
Lambda authorizer cache is not distributed between different API Gateways. If you are using the same lambda function between all API-GWs then you should strive to make your lambda be as slim as possible and then you will be able to "enjoy" with your cache solution. I saw lambda authorizers that once the got hot, their runtime took about 2ms!!. so this is something that definitely can take advantage of. My suggestions are:
Upvotes: 0