I'm trying to avoid the ProvisionedThroughputExceededException by setting a custom exponential backoff using the "base" option like we can do in JavaScript according to this answer:
AWS.config.update({
maxRetries: 15,
retryDelayOptions: {base: 500}
});
As it's explained in this documentation, the "base" parameter defines the number used to increase the delay, so "base: 500" would increase the delay like this: 500, 1000, 1500, ...
I'm trying to make the same settings with Boto3 using Python 3.8, but the Boto3 Documentation seems to only allow setting the maximum retries attempts, not the delay options:
from botocore.client import Config
config = Config(
retries = {
'max_attempts': 10,
'mode': 'standard'
}
)
The "mode" option only gets three values: "legacy", "standard" and "adaptive". The doc also mentions a _retry.json file where these options are described and it looks like the "base" option is hardcoded in this file:
"dynamodb": {
"__default__": {
"max_attempts": 10,
"delay": {
"type": "exponential",
"base": 0.05,
"growth_factor": 2
}
So, my question is: Is there any way to set the exponential backoff using Boto3 with Python for DynamoDB?