@@ -63,7 +63,7 @@ import (
6363 "k8s.io/kops/util/pkg/awsinterfaces"
6464)
6565
66- // By default, aws-sdk-go only retries 3 times, which doesn't give
66+ // By default, aws-sdk-go-v2 only retries 3 times, which doesn't give
6767// much time for exponential backoff to work for serious issues. At 13
6868// retries, we'll try a given request for up to ~6m with exponential
6969// backoff along the way.
@@ -268,7 +268,11 @@ func loadAWSConfig(ctx context.Context, region string) (aws.Config, error) {
268268 awsconfig .WithClientLogMode (aws .LogRetries ),
269269 awsconfig .WithLogger (awsLogger {}),
270270 awsconfig .WithRetryer (func () aws.Retryer {
271- return retry .NewAdaptiveMode ()
271+ return retry .NewAdaptiveMode (func (ao * retry.AdaptiveModeOptions ) {
272+ ao .StandardOptions = append (ao .StandardOptions , func (so * retry.StandardOptions ) {
273+ so .MaxAttempts = ClientMaxRetries
274+ })
275+ })
272276 }),
273277 }
274278
@@ -1260,7 +1264,9 @@ func getTags(c AWSCloud, resourceID string) (map[string]string, error) {
12601264 for {
12611265 attempt ++
12621266
1263- response , err := c .EC2 ().DescribeTags (ctx , request )
1267+ response , err := c .EC2 ().DescribeTags (ctx , request , func (o * ec2.Options ) {
1268+ o .RetryMaxAttempts = DescribeTagsMaxAttempts
1269+ })
12641270 if err != nil {
12651271 if isTagsEventualConsistencyError (err ) {
12661272 if attempt > DescribeTagsMaxAttempts {
0 commit comments