-
Notifications
You must be signed in to change notification settings - Fork 62
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
new command aws-sso set-default PROFILE_NAME
#459
Comments
Is there a reason you can't run |
That would not change the profile on all the existing shells, only the newly created ones. I wrote this, https://gist.github.com/marcosdiez/dcb99e0e85d68394c0014c862d459130 which uses Here is how it works: if I type switch_aws_profiles.py, it authenticates and lists all my accounts (sorted by alias instead of account ID) if I type Yes, I could use the So... my problem is solved, but I do believe other people would benefit from it. something like |
wait, there is a 300ms delay for Anyways, sounds like you want |
So... this is the work computer. In which I need to use two VPNs and they have all kind of anti virus. That think is slow. So maybe just running I fiddled with the settings to have my AWS tokens to expire every 8h, which is as long as my work allows my sessions to work. After that I need to call I am new to the company and to having multiple aws accounts. Maybe I am odd, but is this use case of "pick an aws account and stick with it for the whole computer until you choose a different one"? I mean, do you type Again, my problem is solved with the python script I wrote, but I do thing more people have the same use case (but maybe I am wrong). |
I have lots of accounts and multiple roles in the accounts and so I'm always switching between them and honestly the desire to have a bunch of terminals always in sync never has crossed my mind. So I generally set my credentials once per terminal and leave it. Of course, that's how I work and if one profile to rule them all works for you, I'm not going to tell you that you're wrong. :). Basically, don't take my questions/comments as a "no"... more of, making sure we're on the same page before I commit either way. But I personally would definitely want some easy way to know what account/role I'm in- generally set as an ENV var that is included in my shell prompt so I don't try the wrong thing in the wrong account. And this solution seems to make that hard. I suppose you also write a file which could be sourced to update an ENV var, but this is all getting non-standard custom and part of me says that your python script wrapper is a better way. FWIW, I wouldn't be inspecting the Anyways, I'm gonna think about this a bit.... |
Going to close this ticket as I believe it will be resolved via #398. |
Is your feature request related to a problem? Please describe.
I usually work on on aws account/profile at a time, but on multiple terminals.
So just like
kubens
, I wish I would typeaws-sso set-default PROFILE_NAME
and that would set my default profileon all my terminals (and applications, machine wide)
Describe the solution you'd like
I would
aws-sso set-default PROFILE_NAME
and all my terminals (and applications) would have the same profile, so everywhere I type
aws sts get-caller-identity
would give me the same resultDescribe alternatives you've considered
Writing a python script that parses
aws-sso eval
and overwrites~/.aws/credentials
The text was updated successfully, but these errors were encountered: