File tree 1 file changed +3
-6
lines changed
packages/aws-cdk/lib/api/aws-auth
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -530,10 +530,7 @@ export class SDK {
530
530
/**
531
531
* STS is used to check credential validity, don't do too many retries.
532
532
*/
533
- private readonly stsRetryOptions = {
534
- maxRetries : 3 ,
535
- retryDelayOptions : { base : 100 } ,
536
- } ;
533
+ private readonly stsRetryStrategy = new ConfiguredRetryStrategy ( 3 , ( attempt ) => 100 * ( 2 ** attempt ) ) ;
537
534
538
535
/**
539
536
* Whether we have proof that the credentials have not expired
@@ -950,7 +947,7 @@ export class SDK {
950
947
debug ( 'Looking up default account ID from STS' ) ;
951
948
const client = new STSClient ( {
952
949
...this . config ,
953
- ... this . stsRetryOptions ,
950
+ retryStrategy : this . stsRetryStrategy ,
954
951
} ) ;
955
952
const command = new GetCallerIdentityCommand ( { } ) ;
956
953
const result = await client . send ( command ) ;
@@ -977,7 +974,7 @@ export class SDK {
977
974
return ;
978
975
}
979
976
980
- const client = new STSClient ( { ...this . config , ... this . stsRetryOptions } ) ;
977
+ const client = new STSClient ( { ...this . config , retryStrategy : this . stsRetryStrategy } ) ;
981
978
await client . send ( new GetCallerIdentityCommand ( { } ) ) ;
982
979
this . _credentialsValidated = true ;
983
980
}
You can’t perform that action at this time.
0 commit comments