File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/credential-provider-imds/src/remoteProvider Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
export const DEFAULT_TIMEOUT = 1000 ;
2
+
3
+ // The default in AWS SDK for Python and CLI (botocore) is no retry or one attempt
4
+ // https://github.com/boto/botocore/blob/646c61a7065933e75bab545b785e6098bc94c081/botocore/utils.py#L273
2
5
export const DEFAULT_MAX_RETRIES = 0 ;
3
6
4
7
export interface RemoteProviderConfig {
@@ -15,10 +18,7 @@ export interface RemoteProviderConfig {
15
18
16
19
export type RemoteProviderInit = Partial < RemoteProviderConfig > ;
17
20
18
- export function providerConfigFromInit (
19
- init : RemoteProviderInit
20
- ) : RemoteProviderConfig {
21
- const { timeout = DEFAULT_TIMEOUT , maxRetries = DEFAULT_MAX_RETRIES } = init ;
22
-
23
- return { maxRetries, timeout } ;
24
- }
21
+ export const providerConfigFromInit = ( {
22
+ maxRetries = DEFAULT_MAX_RETRIES ,
23
+ timeout = DEFAULT_TIMEOUT
24
+ } : RemoteProviderInit ) : RemoteProviderConfig => ( { maxRetries, timeout } ) ;
You can’t perform that action at this time.
0 commit comments