Skip to content

Commit 01548ac

Browse files
committed
Set Retryer MaxBackoff to 5 minutes to match AWS SDK for Go v1 DefaultRetryerMaxRetryDelay.
1 parent 0346014 commit 01548ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

aws_config.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ func resolveRetryer(ctx context.Context, tokenBucketRateLimiterCapacity int, aws
201201
}
202202

203203
var standardOptions []func(*retry.StandardOptions)
204+
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
205+
// AWS SDK for Go v1 DefaultRetryerMaxRetryDelay: https://github.com/aws/aws-sdk-go/blob/9f6e3bb9f523aef97fa1cd5c5f8ba8ecf212e44e/aws/client/default_retryer.go#L48-L49.
206+
// Note that certain EC2 operations have a lower value: https://github.com/aws/aws-sdk-go/blob/9f6e3bb9f523aef97fa1cd5c5f8ba8ecf212e44e/service/ec2/customizations.go#L34-L46
207+
so.MaxBackoff = 300 * time.Second
208+
})
209+
204210
if v, found, _ := awsconfig.GetRetryMaxAttempts(ctx, awsConfig.ConfigSources); found && v != 0 {
205211
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
206212
so.MaxAttempts = v

0 commit comments

Comments
 (0)