trek10inc / awsume

A utility for easily assuming AWS IAM roles from the command line.
https://awsu.me
MIT License
497 stars 90 forks source link

when region not set for profile, awsume should set the default region #15

Closed felipe1982 closed 6 years ago

felipe1982 commented 6 years ago

most of my roles/users in .aws/config do not have region set. I expect awsume to fall back to the [default] region and set the AWS_REGION env var appropriately.

Instead, the AWS_REGION remains unset.

=========================AWS Profiles========================
PROFILE                 TYPE  SOURCE     MFA?  REGION
ca-master               User  None       No    ap-southeast-2
default                 User  None       No    ap-southeast-2
itoc                    User  None       Yes   None
itoc-preprod            Role  ca-master  Yes   ap-southeast-2
mycli                   User  None       No    ap-southeast-2
myuser                  User  None       No    ap-southeast-2
osssio-audit            Role  itoc       Yes   None
osssio-consbilling      Role  itoc       Yes   None
osssio-dev              Role  itoc       Yes   ap-southeast-2
osssio-ops              Role  itoc       Yes   None
osssio-prod             Role  itoc       Yes   None
osssio-qldonline        Role  itoc       Yes   None
osssio-sandpit          Role  itoc       Yes   None
osssio-staging          Role  itoc       Yes   ap-southeast-2
osssio-test             Role  itoc       Yes   ap-southeast-2
seeingmachines-preprod  Role  ca-master  Yes   ap-southeast-2
seeingmachines-prod     Role  ca-master  Yes   ap-southeast-2
mbarneyjr commented 6 years ago

I have released an update , 1.3.2, that will use the default profile's region when the profile Awsume is using does not have a region listed, which will be set to the AWS_REGION environment variable.

Thank you for the suggestion!