I receive a "Rate exceeded" error message when I try to create, update, or access an AWS service. I want to use Amazon CloudWatch metrics to monitor the number of AWS API calls that I make so that I don't exceed the rate.
Short description
If you're using API calls in automation, then it's a best practice to use CloudWatch usage metrics to avoid rate exceeded errors.
Resolution
To monitor your usage for all AWS resources that publish usage metrics, complete the following steps:
Note: The following example uses the PutMetricData API call.
- Check the default CloudWatch service quota for the API call that you're using. You can also use the Service Quotas console to check the quotas. PutMetricData can manage 500 transactions per second (TPS).
- Open the CloudWatch console.
- In the navigation pane, choose Metrics, and then choose All metrics.
- Choose the AWS/Usage namespace, and then choose PutMetricData.
- Choose the CallCount metric to check the number of times that an API call is made.
- Choose Graphed metrics, and then choose the time range for when you received the rate exceeded error.
- To determine the number of API calls that were made every minute, for Period, choose 1 minute, and then for Statistic, choose SUM.
- To view your current usage, choose Add math, and then choose Start with empty expression.
- In a new row, enter the following:
SERVICE_QUOTA(m1)
Related information
How can I find which AWS API call is causing a "Rate exceeded" error?
Visualizing your service quotas and setting alarms