Skip to content

Commit

Permalink
docs(credential-providers): fix fromTokenFile() env var names (#3412)
Browse files Browse the repository at this point in the history
Co-authored-by: Charlie Orford <charlie.orford@daltix.com>
Co-authored-by: George Fu <kuhe@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 17, 2023
1 parent 3833c24 commit 7196b68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/credential-provider-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const { defaultProvider } = require("@aws-sdk/credential-provider-node");
const { S3Client, GetObjectCommand } = require("@aws-sdk/client-s3");

const provider = defaultProvider({
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(),
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity({
// You must explicitly pass a region if you are not using us-east-1
region: "eu-west-1"
}),
});

const client = new S3Client({ credentialDefaultProvider: provider });
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ The function `fromTokenFile` returns `AwsCredentialIdentityProvider` that reads
| **Configuration Key** | **Environment Variable** | **Required** | **Description** |
| --------------------- | --------------------------- | ------------ | ------------------------------------------------- |
| webIdentityTokenFile | AWS_WEB_IDENTITY_TOKEN_FILE | true | File location of where the `OIDC` token is stored |
| roleArn | AWS_IAM_ROLE_ARN | true | The IAM role wanting to be assumed |
| roleSessionName | AWS_IAM_ROLE_SESSION_NAME | false | The IAM session name used to distinguish sessions |
| roleArn | AWS_ROLE_ARN | true | The IAM role wanting to be assumed |
| roleSessionName | AWS_ROLE_SESSION_NAME | false | The IAM session name used to distinguish sessions |

```javascript
import { fromTokenFile } from "@aws-sdk/credential-providers"; // ES6 import
Expand Down

0 comments on commit 7196b68

Please sign in to comment.