How can I find which AWS API call is causing a "Rate exceeded" error?
Last updated: 2022-02-09
I receive a "Rate exceeded" error message when I try to create, update, or access an AWS service. How do I determine which AWS API call is causing the error?
To determine which API call is causing a Rate exceeded error in your AWS account, do the following:
2. Run an Amazon Athena query to find the API call that's associated with the Rate exceeded error.
To troubleshoot the issue, see the To troubleshoot Rate exceeded errors based on the associated API call and AWS service section of this article.
Create an Amazon Athena table for CloudTrail logs
For instructions, see Using the CloudTrail console to create an Athena table for CloudTrail logs.
Create and run the Athena query to find the associated API call
1. Open the Athena console.
2. Choose the New query tab.
3. Copy and paste the following example query into the query text box, and then choose Run query:
Important: Replace cloudtrail-table-name with the name of your CloudTrail table.
select eventname, errorcode,eventsource,awsregion, useragent,COUNT(*) count FROM cloudtrail-table-name where errorcode = 'ThrottlingException' AND eventtime between '2018-10-14T03:00:08Z' and '2018-10-23T07:15:08Z' group by errorcode,awsregion, eventsource, useragent, eventname order by count desc;
4. In the query output, identify the API calls listed in eventname and eventsource that are associated with the errorcode, "ThrottlingException".
To troubleshoot Rate exceeded errors based on the associated API call and AWS service
Note: Rate exceeded errors can occur with different throttling conditions, depending on the AWS service and API call that you're using.
Refer to the following troubleshooting documentation for the API call and service that's associated with the Rate exceeded error that you're receiving:
For GetResourceConfigHistory or ListDiscoveredResources API calls
For the PutMetricData API call
For API calls related to AWS Auto Scaling
For API calls related to an AWS Lambda function
For API calls related to AWS Elastic Beanstalk
Note: You can also allow AWS API calls to retry after throttling occurs by adding a wait statement. For more information, see Error retries and exponential backoff in AWS.