Setting total number of requests that can be made on HTTP Api Gateway

0

Hi, I wondering if there is any possibility to set maximum total number of requests that can be made on HTTP Api Gateway. In case of REST Api gateway we can use a Usage plan for this. Looking for similar solution.

In my case I need this to secure my endpoints from being called maliciously (spikes in traffic for which I need to pay) & . Not sure if setting only Burst and Rate limit will be enough to secure.

I just want set fix value - for example to set gateway to process at most 10 000 000 requests per month and then can stop working.

symaaa
demandé il y a 3 mois108 vues
1 réponse
0

You can't do that directly; but what you could do is use a custom authorizer which stores the number of calls from each client in a persistent manner (DynamoDB perhaps?) and then allows or disallows access based on the number of requests.

It's extra work to do; the alternative is to use the REST API Gateway service.

profile pictureAWS
EXPERT
répondu il y a 3 mois
  • This will only work if you disable authorization caching, which will increase the cost as API GW will invoke the Lambda function for each request.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions