You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
While attempting to build up retry_logic with a default profile, SharedConfig is returning String for max_attempts where retry_errors#resolve_max_attempts expects it to be an Integer.
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
aws-sdk-core 3.111.0
Version of Ruby, OS environment
-paste the output of ruby -v
/Users/REDACTED/.rvm/gems/ruby-2.6.6/gems/aws-sdk-core-3.111.0/lib/aws-sdk-core/plugins/retry_errors.rb:184:in `resolve_max_attempts': Must provide a positive integer for max_attempts profile option or for ENV['AWS_MAX_ATTEMPTS'] (ArgumentError)
The method used by lib/aws-sdk-core/plugins/retry_errors.rb#resolve_max_attempts calls into Aws.shared_config.max_attempts(profile: cfg.profile) and this method is correctly return the value from the config file on the system, but it is returning it as a String rather than an Integer, which causes the next section of the resolve_max_attempts method to raise an ArgumentError.
Screenshots
If applicable, add screenshots to help explain your problem.
N/A
Additional context
Add any other context about the problem here.
I was able to cast the return to an Integer in retry_errors via Aws.shared_config.max_attempts(profile: cfg.profile).to_i and have everything work as expected in retry_errors. I was also able to set the ENV for ENV['AWS_MAX_ATTEMPTS'] and have everything work as expected. It only seems to hit this condition when I am reading from a profile from .aws/config.
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
A clear and concise description of what the bug is.
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
Version of Ruby, OS environment
-paste the output of ruby -v
To Reproduce (observed behavior)
While trying to build up an S3 Client object with the following config:
Returns:
The method used by
lib/aws-sdk-core/plugins/retry_errors.rb#resolve_max_attempts
calls intoAws.shared_config.max_attempts(profile: cfg.profile)
and this method is correctly return the value from the config file on the system, but it is returning it as a String rather than an Integer, which causes the next section of the resolve_max_attempts method to raise an ArgumentError.Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
N/A
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: