Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): failure to get credentials when session token is not set (#…
…32134) In Node.js, if you assign `undefined` to an environment variable, that variable ends up having the string `"undefined"`. If we are using IAM user credentials, `AWS_SESSION_TOKEN` should not be set, but because we were not handling this edge case, it was getting assigned an invalid value: ``` Welcome to Node.js v22.9.0. Type ".help" for more information. > process.env.AWS_SESSION_TOKEN || process.env.AMAZON_SESSION_TOKEN undefined > process.env.AWS_SESSION_TOKEN = process.env.AWS_SESSION_TOKEN || process.env.AMAZON_SESSION_TOKEN undefined > process.env.AWS_SESSION_TOKEN 'undefined' ``` Closes #32120. ### Checklist - [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information