wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.97k stars 263 forks source link

Region embedded in profile through AWS config files is ignored #182

Open varunchandak opened 6 years ago

varunchandak commented 6 years ago

Suppose I have:

Using awless -p A config set aws.region X, whenever I try to use profile B, it uses the region X.

The correct working should be A::X and B::Y, not B::X

fxaguessy commented 6 years ago

That's an interesting feedback. For now, in awless we chose to manage independently regions and profiles, but it could also make sense to change both region and profile when switching profile.

Note anyway that you can use awless switch to both region and profile: e.g. awless sw A us-west-1.

We will discuss about this feature and its consequences on UX, for example:

varunchandak commented 6 years ago

Never tried the awless switch but I'd recommend to use awless -p A ... as that's how we call the profiles.

awilkins commented 6 years ago

Since you can declare region in the .aws/ config files and the aws cli tools respect this as the default region for that profile, it would be "least surpriseful" if awless did the same thing and switched to the region associated with the profile in the AWS CLI config when switching to that config.

simcap commented 6 years ago

@awilkins I agree with you. We want to indeed "least suprise" the user and follow usual loading of the aws config. We also want to make clear to the user what is going on.

We are in the process of reviewing that, making sure it is proper and it should be included in the next release.

Thanks for the feedback!

simcap commented 6 years ago

I am renaming this issue to reflect the actual bug

simcap commented 6 years ago

@varunchandak if you have time you can use the latest master (stable and compatible) and let me know if that fixes the issue. Cheers!

varunchandak commented 6 years ago

Sure...!

simcap commented 6 years ago

... use awless switch .... to update region and/or profile as awless config set is deprecated for region/profile