0

我需要在主要帐户的辅助帐户中担任临时角色。对于主要帐户,我已经有一个角色,该角色具有辅助角色中临时角色的承担角色策略。但是当我执行命令时

aws sts assume-role --role-arn ${primaryRoleArn} --role-session-name ${awsProfile}

我收到此错误

An error occurred (AccessDenied) when calling the AssumeRole operation: User: arn:aws:iam::xxxxxxx:user/primary is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::secondaryAccount:role/secondary_role

我做错了什么?

4

0 回答 0