question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Misleading InvalidRetryConfigurationError raised for retries

See original GitHub issue

Describe 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:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nateprewittcommented, Jun 14, 2022

Thanks for the PR, @ricardofunke! Now that it’s merged, we can close this out.

1reaction
ricardofunkecommented, Jun 14, 2022

Hi @nateprewitt,

I never did that before, but I’ve just submitted this Pull Request named:

Issue #3300: Adding variables for retry and modes options

Sorry if I made any mistake,

Best regards!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found