Skip to content

Commit aacac32

Browse files
committed
docs(credential-provider): mark other provider as internal
1 parent a3584b0 commit aacac32

File tree

7 files changed

+31
-502
lines changed

7 files changed

+31
-502
lines changed

packages/credential-provider-cognito-identity/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@
22

33
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-cognito-identity/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity)
44
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-cognito-identity.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-cognito-identity)
5+
6+
> An internal package
7+
8+
## Usage
9+
10+
You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers)
11+
instead.

packages/credential-provider-env/README.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,9 @@
33
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-env/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-env)
44
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-env.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-env)
55

6-
## AWS Credential Provider for Node.JS - Environment Variables
6+
> An internal package
77
8-
This module provides a `CredentialProvider` function, `fromEnv`, that reads from
9-
the following environment variables:
8+
## Usage
109

11-
- `AWS_ACCESS_KEY_ID` - The access key for your AWS account.
12-
- `AWS_SECRET_ACCESS_KEY` - The secret key for your AWS account.
13-
- `AWS_SESSION_TOKEN` - The session key for your AWS account. This is only
14-
needed when you are using temporary credentials.
15-
- `AWS_CREDENTIAL_EXPIRATION` - The expiration time of the credentials contained
16-
in the environment variables described above. This value must be in a format
17-
compatible with the [ISO-8601 standard](https://en.wikipedia.org/wiki/ISO_8601)
18-
and is only needed when you are using temporary credentials.
19-
20-
If either the `AWS_ACCESS_KEY_ID` or `AWS_SECRET_ACCESS_KEY` environment
21-
variable is not set or contains a falsy value, the promise returned by the
22-
`fromEnv` function will be rejected.
10+
You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers)
11+
instead.

packages/credential-provider-imds/README.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,9 @@
33
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-imds/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-imds)
44
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-imds.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-imds)
55

6-
## AWS Credential Provider for Node.JS - Instance and Container Metadata
6+
> An internal package
77
8-
This module provides two `CredentialProvider` factory functions,
9-
`fromContainerMetadata` and `fromInstanceMetadata`, that will create
10-
`CredentialProvider` functions that read from the ECS container metadata service
11-
and the EC2 instance metadata service, respectively.
8+
## Usage
129

13-
A `CredentialProvider` function created with `fromContainerMetadata` will return
14-
a promise that will resolve with credentials for the IAM role associated with
15-
containers in an Amazon ECS task. Please see [IAM Roles for Tasks](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)
16-
for more information on using IAM roles with Amazon ECS.
17-
18-
A `CredentialProvider` function created with `fromInstanceMetadata` will return
19-
a promise that will resolve with credentials for the IAM role associated with
20-
an EC2 instance.
21-
Please see [IAM Roles for Amazon EC2](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
22-
for more information on using IAM roles with Amazon EC2.
23-
Both IMDSv1 (a request/response method) and IMDSv2 (a session-oriented method) are supported.
24-
Please see [Configure the instance metadata service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) for more information.
25-
26-
## Supported configuration
27-
28-
You may customize how credentials are resolved by providing an options hash to
29-
the `fromContainerMetadata` and `fromInstanceMetadata` factory functions. The
30-
following options are supported:
31-
32-
- `timeout` - The connection timeout (in milliseconds) to apply to any remote
33-
requests. If not specified, a default value of `1000` (one second) is used.
34-
- `maxRetries` - The maximum number of times any HTTP connections should be
35-
retried. If not specified, a default value of `0` will be used.
10+
You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers)
11+
instead.

packages/credential-provider-ini/README.md

Lines changed: 4 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -3,166 +3,9 @@
33
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-ini/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-ini)
44
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-ini.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-ini)
55

6-
## AWS Credential Provider for Node.JS - Shared Configuration Files
6+
> An internal package
77
8-
This module provides a function, `fromIni` that will create
9-
`CredentialProvider` functions that read from a shared credentials file at
10-
`~/.aws/credentials` and a shared configuration file at `~/.aws/config`. Both
11-
files are expected to be INI formatted with section names corresponding to
12-
profiles. Sections in the credentials file are treated as profile names, whereas
13-
profile sections in the config file must have the format of`[profile profile-name]`,
14-
except for the default profile. Please see the [sample
15-
files](#sample-files) below for examples of well-formed configuration and
16-
credentials files.
8+
## Usage
179

18-
Profiles that appear in both files will not be merged, and the version that
19-
appears in the credentials file will be given precedence over the profile found
20-
in the config file.
21-
22-
## Supported configuration
23-
24-
You may customize how credentials are resolved by providing an options hash to
25-
the `fromIni` factory function. The following options are supported:
26-
27-
- `profile` - The configuration profile to use. If not specified, the provider
28-
will use the value in the `AWS_PROFILE` environment variable or a default of
29-
`default`.
30-
- `filepath` - The path to the shared credentials file. If not specified, the
31-
provider will use the value in the `AWS_SHARED_CREDENTIALS_FILE` environment
32-
variable or a default of `~/.aws/credentials`.
33-
- `configFilepath` - The path to the shared config file. If not specified, the
34-
provider will use the value in the `AWS_CONFIG_FILE` environment variable or a
35-
default of `~/.aws/config`.
36-
- `mfaCodeProvider` - A function that returns a a promise fulfilled with an
37-
MFA token code for the provided MFA Serial code. If a profile requires an MFA
38-
code and `mfaCodeProvider` is not a valid function, the credential provider
39-
promise will be rejected.
40-
- `roleAssumer` - A function that assumes a role and returns a promise
41-
fulfilled with credentials for the assumed role. You may call `sts:assumeRole`
42-
API within this function.
43-
- `roleAssumerWithWebIdentity` - A function that assumes a role with web identity
44-
and returns a promise fulfilled with credentials for the assumed role. You may call
45-
`sts:assumeRoleWithWebIdentity` API within this function.
46-
47-
## Sample files
48-
49-
### `~/.aws/credentials`
50-
51-
```ini
52-
[default]
53-
aws_access_key_id=foo
54-
aws_secret_access_key=bar
55-
56-
[dev]
57-
aws_access_key_id=foo2
58-
aws_secret_access_key=bar2
59-
60-
[prod]
61-
aws_access_key_id=foo3
62-
aws_secret_access_key=bar3
63-
```
64-
65-
### `~/.aws/config`
66-
67-
```ini
68-
[default]
69-
aws_access_key_id=foo
70-
aws_secret_access_key=bar
71-
72-
[profile dev]
73-
aws_access_key_id=foo2
74-
aws_secret_access_key=bar2
75-
76-
[profile prod]
77-
aws_access_key_id=foo3
78-
aws_secret_access_key=bar3
79-
80-
[profile "testing host"]
81-
aws_access_key_id=foo4
82-
aws_secret_access_key=bar4
83-
```
84-
85-
### profile with source profile
86-
87-
```ini
88-
[second]
89-
aws_access_key_id=foo
90-
aws_secret_access_key=bar
91-
92-
[first]
93-
source_profile=second
94-
role_arn=arn:aws:iam::123456789012:role/example-role-arn
95-
```
96-
97-
### profile with source provider
98-
99-
You can supply `credential_source` options to tell the SDK where to source
100-
credentials for the call to `AssumeRole`. The supported credential providers are
101-
listed bellow:
102-
103-
```ini
104-
[default]
105-
role_arn=arn:aws:iam::123456789012:role/example-role-arn
106-
credential_source = Ec2InstanceMetadata
107-
```
108-
109-
```ini
110-
[default]
111-
role_arn=arn:aws:iam::123456789012:role/example-role-arn
112-
credential_source = Environment
113-
```
114-
115-
```ini
116-
[default]
117-
role_arn=arn:aws:iam::123456789012:role/example-role-arn
118-
credential_source = EcsContainer
119-
```
120-
121-
### profile with web_identity_token_file
122-
123-
```ini
124-
[default]
125-
web_identity_token_file=/temp/token
126-
role_arn=arn:aws:iam::123456789012:role/example-role-arn
127-
```
128-
129-
You can specify another profile(`second`) whose credentials are used to assume
130-
the role by the `role_arn` setting in this profile(`first`).
131-
132-
```ini
133-
[second]
134-
web_identity_token_file=/temp/token
135-
role_arn=arn:aws:iam::123456789012:role/example-role-2
136-
137-
[first]
138-
source_profile=second
139-
role_arn=arn:aws:iam::123456789012:role/example-role
140-
```
141-
142-
### profile with sso credentials
143-
144-
Please refer the the [`sso credential provider package`](https://www.npmjs.com/package/@aws-sdk/credential-provider-sso)
145-
for how to configure the SSO credentials.
146-
147-
```ini
148-
[default]
149-
sso_account_id = 012345678901
150-
sso_region = us-east-1
151-
sso_role_name = SampleRole
152-
sso_start_url = https://d-abc123.awsapps.com/start
153-
```
154-
155-
You can specify another profile(`second`) whose credentials derived from SSO
156-
are used to assume the role by the `role_arn` setting in this profile(`first`).
157-
158-
```ini
159-
[second]
160-
sso_account_id = 012345678901
161-
sso_region = us-east-1
162-
sso_role_name = example-role-2
163-
sso_start_url = https://d-abc123.awsapps.com/start
164-
165-
[first]
166-
source_profile=second
167-
role_arn=arn:aws:iam::123456789012:role/example-role
168-
```
10+
You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers)
11+
instead.

packages/credential-provider-process/README.md

Lines changed: 4 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,9 @@
33
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/credential-provider-process/latest.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-process)
44
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/credential-provider-process.svg)](https://www.npmjs.com/package/@aws-sdk/credential-provider-process)
55

6-
## AWS Credential Provider for Node.JS - Shared Configuration Files
6+
> An internal package
77
8-
This module provides a function, `fromSharedConfigFiles` that will create
9-
`CredentialProvider` functions that read from a shared credentials file at
10-
`~/.aws/credentials` and a shared configuration file at `~/.aws/config`. Both
11-
files are expected to be INI formatted with section names corresponding to
12-
profiles. Sections in the credentials file are treated as profile names, whereas
13-
profile sections in the config file must have the format of`[profile profile-name]`, except for the default profile. Please see the [sample
14-
files](#sample-files) below for examples of well-formed configuration and
15-
credentials files.
8+
## Usage
169

17-
Profiles that appear in both files will not be merged, and the version that
18-
appears in the credentials file will be given precedence over the profile found
19-
in the config file.
20-
21-
## Supported configuration
22-
23-
You may customize how credentials are resolved by providing an options hash to
24-
the `fromSharedConfigFiles` factory function. The following options are
25-
supported:
26-
27-
- `profile` - The configuration profile to use. If not specified, the provider
28-
will use the value in the `AWS_PROFILE` environment variable or a default of
29-
`default`.
30-
- `filepath` - The path to the shared credentials file. If not specified, the
31-
provider will use the value in the `AWS_SHARED_CREDENTIALS_FILE` environment
32-
variable or a default of `~/.aws/credentials`.
33-
- `configFilepath` - The path to the shared config file. If not specified, the
34-
provider will use the value in the `AWS_CONFIG_FILE` environment variable or a
35-
default of `~/.aws/config`.
36-
37-
## Sample files
38-
39-
### `~/.aws/credentials`
40-
41-
```ini
42-
[default]
43-
credential_process = /usr/local/bin/awscreds
44-
45-
[dev]
46-
credential_process = /usr/local/bin/awscreds dev
47-
48-
[prod]
49-
credential_process = /usr/local/bin/awscreds prod
50-
```
51-
52-
### `~/.aws/config`
53-
54-
```ini
55-
[default]
56-
credential_process = /usr/local/bin/awscreds
57-
58-
[profile dev]
59-
credential_process = /usr/local/bin/awscreds dev
60-
61-
[profile prod]
62-
credential_process = /usr/local/bin/awscreds prod
63-
```
10+
You probably shouldn't, at least directly. Please use [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers)
11+
instead.

0 commit comments

Comments
 (0)