From 7196b6819fa32c2156e4018b031063191ea771da Mon Sep 17 00:00:00 2001 From: Charlie Orford Date: Thu, 17 Aug 2023 21:29:19 +0100 Subject: [PATCH] docs(credential-providers): fix fromTokenFile() env var names (#3412) Co-authored-by: Charlie Orford Co-authored-by: George Fu --- packages/credential-provider-node/README.md | 5 ++++- packages/credential-providers/README.md | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/credential-provider-node/README.md b/packages/credential-provider-node/README.md index 5aeb12948651..76266c722c19 100644 --- a/packages/credential-provider-node/README.md +++ b/packages/credential-provider-node/README.md @@ -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 }); diff --git a/packages/credential-providers/README.md b/packages/credential-providers/README.md index 1834dd80aa84..4b55e0386754 100644 --- a/packages/credential-providers/README.md +++ b/packages/credential-providers/README.md @@ -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