Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Add CLI option to override the default local profile on disk #132

Closed
gdestuynder opened this issue Nov 22, 2019 · 5 comments · Fixed by #157
Closed

Add CLI option to override the default local profile on disk #132

gdestuynder opened this issue Nov 22, 2019 · 5 comments · Fixed by #157
Labels

Comments

@gdestuynder
Copy link
Contributor

such as
maws -o awscli --override-default so that ~/.aws/credentials has a [default] entry for example

@gdestuynder gdestuynder added the Type: enhancement New feature or request label Nov 22, 2019
@april
Copy link
Contributor

april commented Nov 26, 2019

Is calling aws with --profile default sufficient for this?

@gdestuynder
Copy link
Contributor Author

If I'm understanding you correctly: aws --profile generated_name_here is how it works right now, with aws --profile default it will fail if you have no default profile

ex:

maws -o awscli will create this in ~/.aws/credentials:

[MAWS_Something]                                                                                                                                
  aws_access_key_id = xxx
  aws_secret_access_key = yyyy
...

so you then have to call aws --profile MAWS_Something or export AWS_PROFILE=MAWS_Something

with maws -o awscli --override-default the proposal would be to create the entry in ~/.aws/credentials such as this:

[default]
  aws_access_key_id = xxx
  aws_secret_access_key = yyyy
...

so that you can just call aws without setting any profile

@gdestuynder
Copy link
Contributor Author

side note, if your question had a typo where aws should be maws then, yes maws --profile default is probably fine. I don't know if it would be confusing or not to others, but it wouldn't bother me.

@april
Copy link
Contributor

april commented Nov 27, 2019

Nope, I had meant aws. So calling aws without a profile name will set it on default?

So the idea is that maws would have a --profile option, and if that profile was default then it would call aws without using --profile, correct?

@gdestuynder
Copy link
Contributor Author

yea, called aws without a --profile and without the env var AWS_PROFILE set will default to default

what i'm thinking is:
maws --profile default -oawscli will overwrite any [default] profile from ~/.aws/{config,credentials} instead of creating/override a profile with it's own profile name

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

Successfully merging a pull request may close this issue.

3 participants