2017-08-01 80 views
0

这似乎是一个简单的任务,但它以某种方式失败:AWS客户端看不到在~/.aws/credentials中指定的凭据。该文件看起来如下方式:AWS CLI不检测〜/ .aws /凭证

[me] 
aws_access_key_id=xxxx 
aws_secret_access_key=yyyyy 

[alter_ego] 
aws_access_key_id=xxxxx 
aws_secret_access_key=yyyyy 

我使用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 

我试图AWS_CREDENTIAL_PROFILES_FILE设置无济于事:

export AWS_CREDENTIAL_PROFILES_FILE=~/.aws/credentials 

可能是什么问题?

回答

3

那些非默认凭据组,所以你必须明确地选择他们是这样的:

$ aws --profile alter_ego configure list

$ aws --profile me configure list