-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config.LoadDefaultConfig doesn't honor env variables #1116
Comments
I decided to do bit more extensive study and found out that:
outputs:
so it looks like it gets proper information from env config but decides to override it with SharedConfigCredentials. |
After one more round of experiments, this issue seems to be about |
Excellent! |
|
Describe the bug
I've done AWS Assume Role to different account and I have set:
Yet, when I execute binary that does:
AWS Access Key ID from
os.Getenv
andcfg.Credentials
don't match.Version of AWS SDK for Go?
github.com/aws/aws-sdk-go-v2/config v1.1.0
Version of Go (
go version
)?go1.15.7 darwin/amd64
To Reproduce (observed behavior)
Use awscli to assume role on another account.
Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_KEY
Execute code that does:
Output will be something like:
Where
AKIA...5CLY
is myaws_access_key_id
in~/.aws/credentials
(instead of the temporary credential from assumed role).Expected behavior
Output should be something like:
If the environment variables are set, they should override all the settings in
~/.aws
.The text was updated successfully, but these errors were encountered: