-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloudfront - Update Distribution - max retries exceeded #296
Comments
Programmatically the way around this is to add the AWSRetry decorator to the 'client' calls: The reason there are multiple update calls is that boto3 (the library used to connect to AWS) has a very simplistic retry model built in, however with busy AWS accounts it's often insufficient. |
Thanks Mark, that's very helpful 👍 That decorator can be added in my yaml file or I need to modify the python library? |
You need to modify the ansible python module (plugins/modules/cloudfront_distribution.py). If you're able to get it working and are able to open a pull request I should be able to review and get it merged. |
Hi Mark, I did the changes here #297 the retry works because now it takes much longer to throw the error but I still get the same error from AWS. Any idea what can be happening? |
It's tough to say, one option is to increase the initial delay ( The trouble is that most of the time when you're hitting this problem it's because you've got a very busy account. To reduce issues like this we (${DAYJOB}) have been spreading our services across multiple accounts (See also AWS Organisations) and using SAML or Cross-Account trusts for authentication. This has the added benefit of helping to segregate some of the access controls. |
Hi Mark, I spoke with AWS support and share screen and look at logs with them. Even implementing jittered_backoff or exponential_backoff still can see 2 requests at the same time in less than one second. Then those retries have the gaps in between as the backoff works fine. From our side we will execute "update-distribution" using the aws cli from command shell. I don't know if still useful the opened PR or should we see why there are always 2 calls in less than 2 seconds. Thank you very much |
In my opinion PRs going through and adding the retries are valuable, if you're willing to add the extra |
sure! I will, I just need to put few things together before ;) |
@fnavarrodev: Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. Here are the items we could not find in your description:
Please set the description of this issue with this template: |
COMPONENT NAMEcommunity.aws.cloudfront_distribution ANSIBLE VERSION
|
Awsretry/cloudfront distribution SUMMARY Adding AWSRetry.exponential_backoff when updating a cloudfront distribution. Fixes #296 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudfront_distribution Reviewed-by: matej <[email protected]> Reviewed-by: Mark Chappell <None> Reviewed-by: Francesc Navarro <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]>
Awsretry/cloudfront distribution SUMMARY Adding AWSRetry.exponential_backoff when updating a cloudfront distribution. Fixes #296 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudfront_distribution Reviewed-by: matej <[email protected]> Reviewed-by: Mark Chappell <None> Reviewed-by: Francesc Navarro <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]> (cherry picked from commit a9c5553)
Awsretry/cloudfront distribution SUMMARY Adding AWSRetry.exponential_backoff when updating a cloudfront distribution. Fixes #296 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudfront_distribution Reviewed-by: matej <[email protected]> Reviewed-by: Mark Chappell <None> Reviewed-by: Francesc Navarro <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Markus Bergholz <[email protected]> (cherry picked from commit a9c5553)
I'm using your module to update the path of an origin for a cloudfront distribution. It was working fine but now I get this error:
I contacted AWS Support but the issue can not be fixed increasing any limit, apparently we are calling UpdateDistribution 2 or 3 times in less than one minute. In my side I only do one call, like this:
Any idea of how can be fixed?
ISSUE TYPE
ANSIBLE VERSION
2.10
COMPONENT NAME
cloudfront_distribution
The text was updated successfully, but these errors were encountered: