aws-amicleaner
aws-amicleaner copied to clipboard
RequestLimitExceeded when trying to remove thousands of AMIs
I have thousands of AMIs to clean on my AWS account. But because AWS API has some rate limits, I get
botocore.exceptions.ClientError: An error occurred (RequestLimitExceeded) when calling the DeregisterImage operation (reached max retries: 4): Request limit exceeded.
I made a pull request to increase max_attempts for boto3 (default is 4). It uses exponential backoff between API calls when it gets RequestLimitExceeded
this way I can remove thousands of AMIs without app exception.
https://github.com/bonclay7/aws-amicleaner/pull/88
cay thế nhờ