Client API Throttling in API Gateway

1

Customer that is looking to implement throttling on their APIs exposed via API Gateway and would like to know if that throttling occurs before invocation of a Lambda custom authorizer, which they are also implementing.

1개 답변
1
수락된 답변

There are different types of rate limiting that can be applied on API Gateway. The different types of rate limiting can be found on this security whitepaper on page 11. https://d1.awsstatic.com/whitepapers/api-gateway-security.pdf?svrd_sip6

If the rate limiting leverages usage plans with an API key (the apiKeySource is set to AUTHORIZER) then the Lambda Authorizer needs to be invoked since the Lambda Authorizer function must return usage plan's API keys as the usageIdentifierKey property value. See link below: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html

If the rate limiting is enforced by API setting on the resource/method then the custom authorizer does not need to get invoked.

If any of the limits are exceeded for the rate limit, Amazon API Gateway blocks the request and returns a 429 Too Many Requests error response to the client. Client logic or SDKs should be configured to retry such errors, although with increasing back off intervals upon repeat failures of the same type.

AWS
중재자
답변함 3년 전

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

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

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