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.

1回答
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
エキスパート
回答済み 3ヶ月前
  • 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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ