This repository was archived by the owner on Apr 22, 2025. It is now read-only.
Commit 7afef9c
authored
fix(cli-integ): atmosphere credentials not used when profile is set via AWS_PROFILE (#83)
In CodeBuild, our initial credentials are configured via a profile
`~/.aws/config` and set via the `AWS_PROFILE` env variable.
This in turn causes the SDK to prefer the profile credentials, even
after acquiring an atmosphere environment that provides static env
creds:
```console
@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
--
741 | Multiple credential sources detected:
742 | Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
743 | This SDK will proceed with the AWS_PROFILE value.
744 |
745 | However, a future version may change this behavior to prefer the ENV static credentials.
746 | Please ensure that your environment only sets either the AWS_PROFILE or the
747 | AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
```
To fix, lets unset the `AWS_PROFILE` variable if/when static env creds
are used.1 parent 0716633 commit 7afef9c
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
0 commit comments