How can I find which API call is causing the "Rate exceeded" error?

Last updated: 2020-03-18

I received the error "Rate exceeded" creating, updating, or accessing an AWS service, but I don't know which API call is causing this error.

Resolution

Use AWS CloudTrail to create a table for CloudTrail logs, and run an Amazon Athena query to find the API call associated with the "Rate exceeded" error. Then, follow these instructions to troubleshoot the "Rate exceeded" throttling error for the AWS API call.

Create and run the Athena query to find the AWS API call

1.    Open the CloudTrail console.

2.    Follow the instructions to create a CloudTrail trail.

3.    Follow the instructions to create a table for a CloudTrail trail.

4.    Open the Athena console, and choose the New query tab.

5.    Copy and paste the following example query, and then choose Run query.

Note: 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;

6.    In the query output, note the API calls listed in eventname and eventsource associated with the errorcode "ThrottlingException".

Troubleshoot the "Rate exceeded" throttling error for the AWS API call

The "Rate exceeded" error can occur with different throttling conditions depending on the AWS service and API call. Refer to the following troubleshooting documentation for your API call and AWS service.