1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
Hi,
You are right, http api does not have usage plans out of box, while as rest api type does instead.
You would need a handle it yourself. I would take inspiration from the built-in usage model and build it for your api. You could store the limits for your customers in a database(dynamo).
Then each time an api is called, you would check whether the rate limit is passed for a customer, if so the api would throw a 4xx error.
If limit is still below threshold, increment the limit counter.
You could implement those check in different flavors such as Lambda@edge, or api gateway backed by a step function with lambda steps performing the check and counter increments.
Hope this ideas can inspire you
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 일 년 전