aws-amicleaner icon indicating copy to clipboard operation
aws-amicleaner copied to clipboard

RequestLimitExceeded when trying to remove thousands of AMIs

Open stolendog opened this issue 6 years ago • 1 comments

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

stolendog avatar Jul 29 '18 16:07 stolendog

cay thế nhờ

Viet1612 avatar Oct 24 '22 04:10 Viet1612