aws api_error ai_generated true

An error occurred (ThrottlingException): Rate exceeded

ID: aws/throttling-exception

Also available as: JSON · Markdown
90%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
2 active

Root Cause

AWS API rate limit hit. Common in automation scripts, Lambda bursts, and CI/CD pipelines.

generic

Workarounds

  1. 95% success Implement exponential backoff with jitter
    Use boto3 built-in retry config: config=Config(retries={'max_attempts': 10, 'mode': 'adaptive'})

    Sources: https://docs.aws.amazon.com/general/latest/gr/api-retries.html

  2. 85% success Batch API calls and spread requests across time windows
    # Instead of individual calls, use batch APIs where available:
    # S3: aws s3api delete-objects (up to 1000 keys per call)
    # DynamoDB: batch_write_item (up to 25 items per call)
    # SQS: send_message_batch (up to 10 messages per call)
    
    # Spread requests with a token bucket or rate limiter:
    import time
    for batch in chunks(items, 25):
        client.batch_write_item(RequestItems=batch)
        time.sleep(0.1)  # spread across time window

    Sources: https://docs.aws.amazon.com/general/latest/gr/api-retries.html

Dead Ends

Common approaches that don't work:

  1. Add sleep(1) between every API call 60% fail

    Fixed delay is inefficient — too slow for normal, too fast for bursts

  2. Increase service quota immediately 50% fail

    Quota increase takes time and may not be the bottleneck

Error Chain

Frequently confused with: