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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인