Skip to content

Commit 7e9e423

Browse files
Add comment explaining AWS credential provider chain (#7771)
* Add comment explaining AWS credential provider chain Adds a comment explaining how AWS SDK resolves credentials using the default credential provider chain (environment variables, shared credentials files, and IAM roles). This may help developers who are unfamiliar with how credentials are automatically discovered by the SDK. * Shorten credential provider chain comment based on review feedback
1 parent da64b81 commit 7e9e423

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

javascriptv3/example_code/ses/src/libs/sesClient.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ sesClient.js is a helper function that creates an Amazon Simple Email Services (
1414
import { SESClient } from "@aws-sdk/client-ses";
1515
// Set the AWS Region.
1616
const REGION = "us-east-1";
17+
// Credentials are automatically resolved using the AWS SDK credential provider chain.
18+
// For more information, see https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html
1719
// Create SES service object.
1820
const sesClient = new SESClient({ region: REGION });
1921
export { sesClient };

0 commit comments

Comments
 (0)