Skip to content

Commit

Permalink
docs(credential-provider-node): mention fromNodeProviderChain in README
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed May 5, 2022
1 parent be9e82a commit 9cd2c43
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/credential-provider-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ const provider = defaultProvider({
const client = new S3Client({ credentialDefaultProvider: provider });
```

_IMPORTANT_: We provide a wrapper of this provider in `@aws-sdk/credential-providers`
package to save you from importing `getDefaultRoleAssumerWithWebIdentity()` or
`getDefaultRoleAssume()` from STS package. Similarly, you can do:

```js
const { fromNodeProviderChain } = require("@aws-sdk/credential-providers");

const credentials = fromNodeProviderChain();

const client = new S3Client({ credentials });
```

## Supported configuration

You may customize how credentials are resolved by providing an options hash to
Expand Down

0 comments on commit 9cd2c43

Please sign in to comment.