Misleading InvalidRetryConfigurationError raised for retries
See original GitHub issueDescribe the issue
This documentation tells us that we can use “retry_mode” option in the retries parameter for the Config class, but it seems that it is not true:
[ricardofunke@ricardofunke dynamodb_queries]$ python3 dynacount.py
Traceback (most recent call last):
File "/home/ricardofunke/dynamodb_queries/dynacount.py", line 11, in <module>
config = Config(
File "/home/ricardofunke/.local/lib/python3.10/site-packages/botocore/config.py", line 236, in __init__
self._validate_retry_configuration(self.retries)
File "/home/ricardofunke/.local/lib/python3.10/site-packages/botocore/config.py", line 282, in _validate_retry_configuration
raise InvalidRetryConfigurationError(
botocore.exceptions.InvalidRetryConfigurationError: Cannot provide retry configuration for "retry_mode". Valid retry configuration options are: 'max_attempts'
The Boto3 versions I’m using:
[ricardofunke@ricardofunke dynamodb_queries]$ python3 -m pip list | grep boto
boto3 1.24.7
botocore 1.27.7
The code:
import boto3
from botocore.config import Config
config = Config(
retries = {
'max_attempts': 10,
'retry_mode': 'adaptive'
}
)
Links
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Config Reference — botocore 1.29.32 documentation - AWS
This includes the initial request, so a value of 1 indicates that no requests will be retried. If total_max_attempts and max_attempts are both...
Read more >How to handle errors with boto3? - Stack Overflow
InvalidRetryConfigurationError is an exception type boto3. ... but catches the client.exceptions - although it 'looks' somewhat wrong... it ...
Read more >aws-cli: awscli/botocore/config.py Source File - Fossies
19 InvalidRetryConfigurationError, ... 118 :param retries: A dictionary for retry specific configurations. ... 247 raise InvalidRetryConfigurationError(.
Read more >retry.py - Google Git
response = http.request('GET', 'http://example.com/', retries=False) ... retries are disabled, in which case the causing exception will be raised.
Read more >Misleading InvalidRetryConfigurationError raised for retries
InvalidRetryConfigurationError : Cannot provide retry configuration for "retry_mode". Valid retry configuration options are: 'max_attempts'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the PR, @ricardofunke! Now that it’s merged, we can close this out.
Hi @nateprewitt,
I never did that before, but I’ve just submitted this Pull Request named:
Sorry if I made any mistake,
Best regards!