【发布时间】:2021-07-29 05:01:24
【问题描述】:
我正在使用 AWS Control Tower 和 AWS Organization 的多账户架构。我有一个主账户,其中有一个名为 agent 的 IAM 用户(没有附加策略,只有 CLI 访问权限),然后我有另一个名为 dev 的 AWS 账户,我在其中创建了一个名为工作负载部署者的新角色 (ARN -> arn :aws:iam::809348927750:role/workload-deployer) 具有以下信任关系:-
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::185288728304:user/agent"
},
"Action": "sts:AssumeRole",
"Condition": {}
}
]
}
当我尝试担任此角色时,我收到以下错误:-
An error occurred (AccessDenied) when calling the AssumeRole operation: User: arn:aws:iam::185288728304:user/agent is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::809348927750:role/workload-deployer
我正在运行以承担角色的命令:-
aws sts assume-role --role-arn arn:aws:iam::809348927750:role/workload-deployer --role-session-name "RoleSession1" --duration-seconds 900 --profile zm
【问题讨论】:
-
您需要在您的
agent上制定一项政策,以允许sts:AssumeRole担任任何其他角色。
标签: amazon-web-services amazon-iam aws-sts