Skip to content

'aws configure get region' does not work with the --profile flag #7016

Answered by kdaily
YevheniiPokhvalii asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @YevheniiPokhvalii,

Sorry to hear you're having an issue. I was not able to reproduce this - providing a --profile value returns the region set for that profile. I have in my ~/.aws/config file:

[profile some_other_profile]
region=ap-south-1

Running this:

$ aws configure get region --profile some_other_profile
ap-south-1

What do you get if you run aws configure list --profile some_other_profile?

You can also check what the debug logs show by adding --debug to your command. You should see (among other statements) the following:

...
2022-06-01 09:36:08,529 - MainThread - botocore.session - DEBUG - Setting config variable for profile to 'some_other_profile'
...
2022-06-01 09:36:08,541 -…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by tim-finnigan
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@YevheniiPokhvalii
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #6997 on June 04, 2022 00:13.