I am wondering if there are any EC2 API Throttling Limits like EMR that would limit the number of calls you can make to EC2 per second or min?
If so, what are they these limits? are they published anywhere?
API rate limits are configured for each AWS account on a per-Region basis. Implementing a multi-account strategy can help to spread workloads across multiple accounts. This provides independent Service Quotas for each account and Region, which means there is less contention for the same set of API rate limits.
AWS throttling limits are applied across all accounts and clients in a region. These limit settings exist to prevent your API—and your account—from being overwhelmed by too many requests. These limits are set by AWS and can't be changed by a customer.
Microsoft is implementing API throttling to allow more consistent performance within a time span for partners calling the Partner Center APIs. Throttling limits the number of requests to a service in a time span to prevent overuse of resources.
Amazon EC2 has meanwhile documented their general Query API Request Rate handling:
We throttle Amazon EC2 API requests for each AWS account to help the performance of the service. We ensure that all calls to the Amazon EC2 API (whether they originate from an application, calls to the Amazon EC2 command line interface, or the Amazon EC2 console) don't exceed the maximum allowed API request rate. Note that API requests made by IAM users are attributed to the underlying AWS account.
The Amazon EC2 API actions are divided into the following categories:
[...]If an API request exceeds the API request rate for its category, the request returns the RequestLimitExceeded error code. To prevent this error, ensure that your application doesn't retry API requests at a high rate. You can do this by using care when polling and by using exponential back-off retries.
While the details might vary between the plethora of their services, I think it is safe to assume similar patterns in place usually (not the least due to EC2 backing many of the other services too).
Both the aforementioned explanation from EC2 as well as a few indirect quotes from users interacting with AWS support seem to suggest that the limits can vary by service status and per account even, i.e. AWS is capable of raising/reducing limits for individual accounts depending on dedicated high performance use cases, suspected abuse etc., see e.g.:
RequestLimitExceeded
within Client Error Codes, hinting on per account handling:
The maximum request rate permitted by the Amazon EC2 APIs has been exceeded for your account. [...]
How do we get the EBS API rate limit increased?:
Rightscale support have said we need to contact Amazon to get the EBS API rate limit increased as it seems we are exceeding calls to this API as we have a large number of MySQL databases in this account and they are all having EBS snapshots taken for backups.
The AWS team's response to Error: Request limit exceeded using boto to launch and terminate instances:
The rate limit that you will see with EC2 can vary depending on system load.
Saul's answer to Amazon Web Services S3 Request Limit:
However, after posting this question I received an email from AWS that said the had capped my LIST requests to 10 requests per second because I had too many going to a specific bucket.
Of course their are usually exception to most rules, I'm aware of the following two services documenting specific limits:
Amazon Route 53 is documenting its specific Limits on Amazon Route 53 API Requests and Entity Counts:
All requests: Five requests per second per AWS account. [...]
Amazon SES also documents a specific limit of one request/second for most API actions (presumably all but SendEmail and SendRawEmail), see e.g. GetSendQuota:
This action is throttled at one request per second.
As outlined on Troubleshooting API Request Errors, the correct approach for handling this on the client side is to implement Error Retries and Exponential Backoff in AWS (most AWS SDKs meanwhile apply this guidance automatically, including options to adjust the default retry policy or add a custom implementation even).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With