tilfinltd / aws-extend-switch-roles

Extend your AWS IAM switching roles by Chrome extension, Firefox add-on, or Edge add-on
https://chromewebstore.google.com/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?utm_source=github
MIT License
1.32k stars 141 forks source link

How do we set the region for the main accout ? #151

Closed bougui closed 3 years ago

bougui commented 4 years ago

Hello,

everything is working great for me except 1 thing when I go back to my aws login account I keep the last region as define as in my previous switch role. Can we define default region for the defaut role ? I have tried to put a region in my main profile like this but it is not working ....

[main]
aws_account_id = My-main-account
region=ca-central-1

[client-1]
role_arn = arn:aws:iam::123...:role/admins
source_profile = main
role_session_name = bougui@main.wui
color = 3d32e2
region=us-east-1

[client-2]
role_arn = arn:aws:iam::321...:role/admins
source_profile = main
role_session_name = bougui@main.wui
color = 3d32e2
region=us-east-1

Thanks for any precision on how to do this.

tilfin commented 4 years ago

Please try to define it as target_region in the main profile section. the document of #125 hasn't been appended.

bougui commented 4 years ago

So all I need to do is edit the configuration like this ? If this is the solution when I go back to my may account the region does not go back to ca-central-1 ;-(

[main] aws_account_id = My-main-account taget_region=ca-central-1

Let me know if you want me to test more options.

Thanks.

tilfin commented 3 years ago

I was misunderstood. There is no ability to control the region when you log in to your master account.