Reputation: 1932
I have a few profiles set up in my AWS configure file. How do I check what the current profile is set to?
I am not looking to get the value set on the profile: https://docs.aws.amazon.com/cli/latest/reference/configure/get.html
I am not looking for a list of profiles: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/list-profiles.html
Question: how do I check my currently active profile in AWS CLI?
Upvotes: 10
Views: 14150
Reputation: 21
I was looking to do the same thing and here is the solution I came up with.
First, I had to understand that when you run an AWS CLI command, to run it with a specific profile, you use aws s3 blahblah --profile myawsprofile
But I wanted to run commands without having to specify my profile each time.
To do this, I looked in my ~/.aws/credentials In here, I can see all my profiles.
I moved the profile I wanted to use into the default position.
Upvotes: 1