Create and Use API Gateway Usage Plans
After you create, test, and deploy your APIs, you can extend them as product offerings for your customers. You can provide usage plans to allow specified customers to access selected APIs at agreed-upon request rates and quotas that can meet their business requirements and budgetary constraints.
What Is a Usage Plan?
A usage plan provides access to one or more deployed API stages with configurable throttling and quota limits enforced on individual client API keys. API callers are identified by API keys that can be generated by API Gateway or imported from external sources. The throttling prescribes the request rate limits applied to each API key. The quotas are the maximum number of requests with a given API key submitted within a specified time interval. Individual API methods can be configured to require API key authorization based on usage plan configuration. An API stage is identified by an API identifier and a stage name.
Throttling and quota limits apply to requests for individual API keys that are aggregated across all API stages within a usage plan.
How to Configure a Usage Plan?
The following steps outlines how you, as the API owner, configure a usage plan for your customers.
To configure a usage plan
Create one or more APIs, configure the methods to require an API key, and deploy the APIs in stages.
Generate API keys and distribute the keys to app developers (your customers) using your APIs.
Create the usage plan with the desired throttle and quota limits.
Associate selected API stages and API keys to the usage plan.
Callers of the API must supply an assigned API key in the
header in requests to the API.
To enforce authorization of the API key in requests to the API, individual API methods must be configured to require an API key. Setting this configuration ensures the incoming API key will be authorized according to the usage plan configuration.
The following sections provide detailed instructions for these tasks.
- Set Up API Keys Using the API Gateway Console
- Create, Configure, and Test Usage Plans with the API Gateway Console
- Set Up API Keys Using the API Gateway REST API
- Create, Configure, and Test Usage Plans Using the API Gateway REST API
- API Gateway API Key File Format
- Use API Keys in API Gateway without Usage Plans Enabled