我无法在AWS的网络界面上找到this setting:
您还需要编辑角色的信任关系以允许 帐户(即使它是相同的)承担这个角色。
open the role that you want to assume in the console click on the "Trust Relationships" tab click on "Edit RelationShip"
是否有截图?我正在阅读AWS Command Line Interface User Guide手册,但不知道在哪里配置信任关系。
thufir@doge:~$
thufir@doge:~$ cat .aws/config
[default]
output = text
region = us-west-2
[profile thufir]
role_arn = arn:aws:iam::1234567890:user/thufir
source_profile = default
thufir@doge:~$
thufir@doge:~$ aws iam list-users
USERS arn:aws:iam::1234567890:user/thufir 2017-01-02T10:09:01Z / ABCDEFGIJKL thufir
thufir@doge:~$
thufir@doge:~$ aws s3 ls --profile thufir
An error occurred (AccessDenied) when calling the AssumeRole operation: Roles may not be assumed by root accounts.
thufir@doge:~$
thufir@doge:~$ export AWS_DEFAULT_PROFILE=thufir
thufir@doge:~$
thufir@doge:~$ aws s3 ls --profile thufir
An error occurred (AccessDenied) when calling the AssumeRole operation: Roles may not be assumed by root accounts.
thufir@doge:~$