AWS CLI无法检测〜/ .aws /凭证

Dim*_*iev 1 amazon-web-services

这似乎是一项简单的任务,但不知何故失败了:AWS客户端没有看到指定的凭据~/.aws/credentials.该文件看起来如下:

[me]
aws_access_key_id=xxxx
aws_secret_access_key=yyyyy

[alter_ego]
aws_access_key_id=xxxxx
aws_secret_access_key=yyyyy
Run Code Online (Sandbox Code Playgroud)

awscli-1.11.128在python3上使用.当我跑aws configure list(有或没有sudo)时,我得到:

      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
Run Code Online (Sandbox Code Playgroud)

我试图设置AWS_CREDENTIAL_PROFILES_FILE无济于事:

export AWS_CREDENTIAL_PROFILES_FILE=~/.aws/credentials
Run Code Online (Sandbox Code Playgroud)

可能有什么问题?

lif*_*ter 5

这些是非默认凭证组,因此您必须明确选择它们,如下所示:

$ aws --profile alter_ego configure list

$ aws --profile me configure list