-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
DynamoDB resource ignoring the configuration parameter 'max_attempts' for retries #3930
Comments
Hi @pinarkaymaz6, thanks for reaching out. I had some trouble reproducing this issue; Lambda was able to read the environment variable I had set and created a |
Hi @RyanFitzSimmonsAK , thanks for your answer! I did the implementation according to the boto3 documentation here. However I am having trouble testing this. I was hoping to see some values in the logs. However it does not seem to be the case. How did you confirm that dynamodb uses the new config, for example, if you set max_attempts to 7? |
The config is added to the client during client creation under |
After some digging, I realised that the log Even though my original question figuring out how to confirm retry quota in dynamodb queries still stands, I think this issue is not a Bug. So I'll close this one and open a new one with General Question. |
|
Hey @RyanFitzSimmonsAK , here is my question: #3934 |
Describe the bug
For our DynamoDB implementation in a Lambda, I pass different values to the configuration parameter 'max_attempts' to override the default retry max attempts. However, it does not seem to take effect. I still see the default retry number in the CloudWatch logs of the Lambda.
Here is the code snippet for the dynamodb with retry config:
With the default value, I see the following in the logs stating the default retry value 3:
[DEBUG] 2023-11-13T12:43:14.106Z Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
When I set the environmental variable RETRY_MAX_ATTEMPTS=7, I still see the same log as the default one.
[DEBUG] 2023-11-13T12:43:14.106Z Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
Expected Behavior
Converted retries value in the logs should be the new value.
Example: Retry total should be 7 when
max_attempts
is set to 7:Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
Current Behavior
Even if I pass a new value to 'max_attempts' to override retry configuration, the retry count is still the same in the logs:
When I set the environmental variable RETRY_MAX_ATTEMPTS=7, I still see the same log as the default one.
[DEBUG] 2023-11-13T12:43:14.106Z Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
SDK version used
Python 3.8.1, boto3 1.28.78, botocore 1.31.78
Environment details (OS name and version, etc.)
AWS Lambda Python runtime environment, Linux, Python 3.8
The text was updated successfully, but these errors were encountered: