Skip to content
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

Set "retries" for API #54

Open
widhalmt opened this issue May 28, 2021 · 1 comment
Open

Set "retries" for API #54

widhalmt opened this issue May 28, 2021 · 1 comment

Comments

@widhalmt
Copy link
Member

Version 1.1.0 of the AWS module lacks a way of setting retries for API connections. There's a known issue with some versions of AWS SDK that needs to raise the amount of retries because connections are expected to be failing.

For example if you use boto3 you can use the following code to work around known problems with AWS api:

    config = Config(
       retries = {
           'max_attempts': 10,
           'mode': 'standard'
       }
    )

The Changelog of version 3.130.0 of aws-sdk-php says they introduced this setting : https://github.com/aws/aws-sdk-php/releases/tag/3.130.0 By the way, it's the last version to support the old Guzzle version. So 3.130.0 is the only option to not hit #53 but still be able to set the timeout.

One customer ran some tests and suggested adding such a setting into function initializeSdk() in https://github.com/Icinga/icingaweb2-module-aws/blob/master/library/Aws/AwsClient.php

ref/NC/724192

@lippserd
Copy link
Member

The use of environment variables is sufficient for this, e.g .:

AWS_RETRY_MODE=standard
AWS_MAX_ATTEMPTS=10

If you're also using the assume role feature, you may want to add AWS_METADATA_SERVICE_NUM_ATTEMPTS=10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants