I'd like to provide a free tier for my API and allow new users to test drive it without having to sign up for an API key.
Is there a way that I can set a limit/quota and throttle requests that have no api key on API Gateway?
You can set additional throttling targets at the method level in Usage Plans as shown in Create a usage plan. In the API Gateway console, these are set by specifying Resource= <resource> , Method= <method> in the Configure Method Throttling setting.
API throttling is the process of limiting the number of API requests a user can make in a certain period. An application programming interface (API) functions as a gateway between a user and a software application.
Best practices to handle throttling The following are best practices for handling throttling: Reduce the degree of parallelism. Reduce the frequency of calls. Avoid immediate retries because all requests accrue against your usage limits.
Yes, essentially there are two places where you can configure your throttling options:
In usage plans. You link API Key to usage plan and configure method request to require API key. http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html
n stage settings you can configure default throttling method - this will be applicable to any request (no API key required). http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
what you are looking is 2.
by the way, very important moment - be aware that API Keys are not a security mechanism - you should not use API for authentication purposes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With