Skip to content
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

User Experience issue: use of $AWS_PROFILE sometimes results in data loss #244

Open
bddap opened this issue Mar 10, 2022 · 0 comments
Open

Comments

@bddap
Copy link

bddap commented Mar 10, 2022

Setting AWS_PROFILE usually means "I want to use this profile to run commands."
aws-google-auth interprets is as "I want to overwrite the credentials for this profile."

I've been bitten by this a few times. The problem is that I often already have the environment variable set to some other profile.

export AWS_PROFILE=foo

I run aws-google-auth to refresh the credentials for the sts profile. Instead of updating the sts profile it overwrites the foo profile, deleting the credentials that were there already.

Use of the AWS_PROFILE variable may sometimes result in exactly the right thing happening, but sometimes results in undesired behavior.

If you haven't seen it already, I can highly recommend checking out https://clig.dev, a list of cli best practices. In this case AWS_PROFILE probably counts as a "widely used name".

Anyway, my workaround is be careful to always set the flag --profile sts but it's possible other users have accidentally deleted their credentials in the same way.

A Solution

Perhaps read from AWS_GOOGLE_AUTH_PROFILE instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant