Dima Lituiev
Dima Lituiev

Reputation: 13116

AWS CLI does not detect ~/.aws/credentials

It seems a simple task, but somehow it fails: AWS client does not see the credentials specified in ~/.aws/credentials. The file looks following way:

[me]
aws_access_key_id=xxxx
aws_secret_access_key=yyyyy

[alter_ego]
aws_access_key_id=xxxxx
aws_secret_access_key=yyyyy

I am using awscli-1.11.128 on python3. When I run aws configure list (with or without sudo), I am getting:

      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key                <not set>             None    None
secret_key                <not set>             None    None
    region                <not set>             None    None

I tried to set the AWS_CREDENTIAL_PROFILES_FILE to no avail:

export AWS_CREDENTIAL_PROFILES_FILE=~/.aws/credentials

What might be wrong?

Upvotes: 1

Views: 1136

Answers (1)

lifeofguenter
lifeofguenter

Reputation: 1181

those are non-default credential groups, so you will have to explicitly select them like this:

$ aws --profile alter_ego configure list

$ aws --profile me configure list

Upvotes: 5

Related Questions