1 | import { RemoteProviderInit } from "@aws-sdk/credential-provider-imds";
|
2 | import { FromIniInit } from "@aws-sdk/credential-provider-ini";
|
3 | import { FromProcessInit } from "@aws-sdk/credential-provider-process";
|
4 | import { FromSSOInit } from "@aws-sdk/credential-provider-sso";
|
5 | import { FromTokenFileInit } from "@aws-sdk/credential-provider-web-identity";
|
6 | import { Credentials, MemoizedProvider } from "@aws-sdk/types";
|
7 | export declare type DefaultProviderInit = FromIniInit & RemoteProviderInit & FromProcessInit & FromSSOInit & FromTokenFileInit;
|
8 | /**
|
9 | * Creates a credential provider that will attempt to find credentials from the
|
10 | * following sources (listed in order of precedence):
|
11 | * * Environment variables exposed via `process.env`
|
12 | * * SSO credentials from token cache
|
13 | * * Web identity token credentials
|
14 | * * Shared credentials and config ini files
|
15 | * * The EC2/ECS Instance Metadata Service
|
16 | *
|
17 | * The default credential provider will invoke one provider at a time and only
|
18 | * continue to the next if no credentials have been located. For example, if
|
19 | * the process finds values defined via the `AWS_ACCESS_KEY_ID` and
|
20 | * `AWS_SECRET_ACCESS_KEY` environment variables, the files at
|
21 | * `~/.aws/credentials` and `~/.aws/config` will not be read, nor will any
|
22 | * messages be sent to the Instance Metadata Service.
|
23 | *
|
24 | * @param init Configuration that is passed to each individual
|
25 | * provider
|
26 | *
|
27 | * @see {@link fromEnv} The function used to source credentials from
|
28 | * environment variables
|
29 | * @see {@link fromSSO} The function used to source credentials from
|
30 | * resolved SSO token cache
|
31 | * @see {@link fromTokenFile} The function used to source credentials from
|
32 | * token file
|
33 | * @see {@link fromIni} The function used to source credentials from INI
|
34 | * files
|
35 | * @see {@link fromProcess} The function used to sources credentials from
|
36 | * credential_process in INI files
|
37 | * @see {@link fromInstanceMetadata} The function used to source credentials from the
|
38 | * EC2 Instance Metadata Service
|
39 | * @see {@link fromContainerMetadata} The function used to source credentials from the
|
40 | * ECS Container Metadata Service
|
41 | */
|
42 | export declare const defaultProvider: (init?: DefaultProviderInit) => MemoizedProvider<Credentials>;
|