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

assume-role doesn't work if your AWS environment variables are already set #18

Closed
veqryn opened this issue Aug 11, 2017 · 1 comment
Closed

Comments

@veqryn
Copy link
Contributor

veqryn commented Aug 11, 2017

I have the main two aws environment variables already set:

MinGW 04:43:03 ~$ printenv | sort | grep AWS
AWS_ACCESS_KEY_ID=xxx
AWS_SECRET_ACCESS_KEY=xxx

When I run assume-role, it doesn't ask for my MFA and it just spits out the current variables:

MinGW 04:43:06 ~$ assume-role.exe eo
$env:AWS_ACCESS_KEY_ID="xxx"
$env:AWS_SECRET_ACCESS_KEY="xxx"
$env:AWS_SESSION_TOKEN=""
$env:AWS_SECURITY_TOKEN=""
$env:ASSUMED_ROLE="eo"
# Run this to configure your shell:
# C:\Users\xxx\workspace\programs\bin\assume-role.exe eo | Invoke-Expression

However, if I unset those environment variables, assume-role works properly and asks for my MFA and then gives me new environment variables.

@veqryn
Copy link
Contributor Author

veqryn commented Aug 11, 2017

I think I figured out the reason right after posting this. I'll make a PR...

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