Two kinds of limit behind similar names#
A service calling the AWS API fails with an error your SDK raises as an exception. The name tells you less than you would hope:
- Request rate. EC2 throttles API requests per account per Region with token buckets and returns
RequestLimitExceeded. Many other services returnThrottlingException,ThrottlingorTooManyRequestsException, and S3 returnsSlowDown. EC2 API throttling · SDK error classification - Resource or service quota. EC2 returns
VcpuLimitExceededwhen running On-Demand instances would exceed the account's vCPU quota, andInstanceLimitExceededfor the concurrent instance limit. EC2 error codes
The same name means different things in different services. In DynamoDB, RequestLimitExceeded means throughput above the account's current limit, and LimitExceededException means too many concurrent control plane operations. Lambda returns TooManyRequestsException for a request throughput limit and also when an invocation would exceed account or function concurrency. Read the error reference of the service that raised it. DynamoDB errors · Lambda Invoke errors
This guide is one of a set on runtime dependency failures.
Why the SDK blurs them#
The SDKs retry throttling errors automatically. The AWS SDK reference lists ThrottlingException, TooManyRequestsException, RequestLimitExceeded, SlowDown and also LimitExceededException as throttling errors, retried with a longer base delay than transient errors. A quota error with that name is retried like a rate error and surfaces only after the last attempt. Retry behavior
The retry mode is set with retry_mode or AWS_RETRY_MODE, and attempts with max_attempts or AWS_MAX_ATTEMPTS. The page lists standard as the default with 3 attempts (4 for DynamoDB). adaptive adds a client-side rate limiter that can delay the first request once it sees throttling. standard also keeps a retry quota, a token bucket that stops retries when it is empty, so a client under heavy throttling sees errors returned without retries. As of this writing the page describes behavior that SDKs apply when AWS_NEW_RETRIES_2026=true is set; without it, older defaults apply, so check your SDK's guide for the version you run. Retry behavior
The effect for diagnosis: application logs show the final exception after several attempts. CloudTrail shows each attempt.
Find the call, the caller and the code#
Throttled calls appear in CloudTrail with their errorCode, and AWS's ECS guidance groups them by event name, source and user agent to find who is calling. Some services put error details in responseElements instead of top-level errorCode and errorMessage. ECS throttling and CloudTrail · CloudTrail record contents
Event history covers management events for the last 90 days, one Region at a time. lookup-events cannot filter on errorCode, so filter by event source and window, then parse each CloudTrailEvent. Lookup itself is limited to two requests per second per account per Region, so keep the window short. lookup-events
aws cloudtrail lookup-events \
--profile PROFILE --region REGION \
--lookup-attributes AttributeKey=EventSource,AttributeValue=ec2.amazonaws.com \
--start-time 2026-11-23T08:00:00Z --end-time 2026-11-23T08:30:00Z \
--output json --no-cli-pager \
| jq -r '.Events[].CloudTrailEvent | fromjson
| select(.errorCode != null)
| [.eventName, .errorCode, .userIdentity.arn, .userAgent] | @tsv' \
| sort | uniq -c | sort -rn | head -20
The output answers three questions. Which code: a rate code or a quota code. Which call: one API or many. Which caller: your service alone, or another role in the same account and Region, since EC2's buckets are shared by every caller there, console and tools included. EC2 API throttling
Read the quota#
Service Quotas shows the applied value of a quota and, when one exists, the CloudWatch metric that tracks its usage. EC2 also lists each API action's request bucket capacity and refill rate there. get-service-quota · Viewing EC2 API limits
aws service-quotas list-service-quotas \
--profile PROFILE --region REGION --service-code ec2 \
--query 'Quotas[].{name:QuotaName,code:QuotaCode,value:Value}' \
--output table --no-cli-pager
aws service-quotas get-service-quota \
--profile PROFILE --region REGION --service-code ec2 --quota-code L-1216C47A \
--query 'Quota.{name:QuotaName,value:Value,adjustable:Adjustable,usage:UsageMetric}' \
--output json --no-cli-pager
L-1216C47A is the quota for running On-Demand Standard instances, counted in vCPUs. list-service-quotas
Decision table#
| Observation | Points to |
|---|---|
| Rate code, errors in bursts, later calls succeed | Request rate |
| Rate code, many callers on one API | Shared account and Region bucket |
| Quota code, every retry fails | Resource quota |
| Usage metric at the applied value | Resource quota |
| Same name, meaning unclear | The service's error reference decides |
An illustrative incident with two outcomes#
This example is illustrative. An orders batch worker in account 111122223333 launches EC2 instances for nightly exports. At 08:05 UTC launches fail and the worker logs a final error after three attempts.
In the first outcome, CloudTrail for 08:00 to 08:30 shows 1,900 DescribeInstances calls with RequestLimitExceeded, 1,700 of them from a monitoring role whose user agent names an inventory tool, deployed at 07:50 to poll every instance unfiltered. The worker's own RunInstances calls fail when they arrive while that bucket is drained. EC2 documents separate, larger buckets for filtered and paginated describe calls. Nothing is wrong with the worker or the quota; another caller in the same account and Region is spending the shared rate. EC2 API throttling
In the second outcome, CloudTrail shows 14 RunInstances calls, each with VcpuLimitExceeded. get-service-quota for L-1216C47A returns 256, and running instances already hold 248 vCPUs after a test fleet launched at 06:00 was left running. Backoff cannot help. Freeing the test fleet or raising the quota through an owner can.
Limits#
Event history does not include data events, such as S3 object operations, so throttling on those needs a trail that logs data events or the service's own metrics. S3 CloudTrail events · S3 SlowDown
Rate limits are not always fixed. EC2 also limits RunInstances by the number of instances launched, through a separate resource token bucket, and dynamic throttling temporarily raises the limits for RunInstances and StartInstances when the Availability Zone has spare launch capacity. The same launch pattern can pass one night and be throttled the next. EC2 API throttling
Third-party APIs signal limits with HTTP codes and headers instead. Third-party 429 or 503
Questions#
What is the difference between RequestLimitExceeded and LimitExceeded?
In EC2, RequestLimitExceeded is API request throttling for the account in a Region, and codes such as VcpuLimitExceeded or InstanceLimitExceeded are resource quotas. Other services use LimitExceededException for their own limits, so check that service's error reference.
Does the AWS SDK retry quota errors?
It retries the codes it classifies as throttling, and that list includes LimitExceededException. A quota error with that name is retried until attempts run out. Errors it classifies as non-retryable, such as ValidationException, are returned at once.
Why am I throttled when my service makes few calls?
EC2 request limits apply per account per Region, so every caller there shares the same buckets. Group CloudTrail events by caller to find who spends them.