Create Usage Plan

Contents:

A Usage Plan in API Gateway is a mechanism to manage how clients consume an API by combining quota, throttling, and API Key, applied to specific stages.

Create Usage Plan

  • Go to Usage Plans in the left-hand menu of the API Gateway console.
  • Click Create usage plan

Usage Plan

  • In the Create usage plan interface, enter a name for the plan in Name.
  • Enable Throttling
  • Enter desired values for Rate and Burst
  • Enable Quota
  • Enter the number of Requests as desired (e.g., for normal users set 100 per day, but here we use 10 requests per day for easier testing), and choose Per day as the interval.
  • Click Create usage plan

Rate is the average rate (requests per second – RPS) allowed by API Gateway, while Burst is the maximum number of requests that can be processed instantly during a short spike.

Usage Plan

  • Continue creating Usage Plans for:
    • dev (rate: 1000, burst: 2000, quota disabled)
    • premium user (rate: 20, burst: 40, quota: 100 requests per day)

Usage Plan

Add Associated Stages

When a stage is associated with a Usage Plan, all requests going through that stage will be subject to the quota/throttling rules you defined.

  • Open one of the Usage Plans
  • In the Usage Plan interface, click Add stage

Usage Plan

  • Select API as the API you created (MyProjectAPI)
  • Select Stage as test
  • In Method-level throttling, choose the Resources you created earlier, select Method GET, and customize Rate and Burst.
  • Click Add to usage plan

Usage Plan

  • Repeat for the other usage plans.

Usage Plan
Usage Plan