AWS CLI - 如何将 IAM 策略附加到 SSO 角色?

问题描述 投票:0回答:1

假设:

  1. 用户 X 在 Azure AD 中进行管理,并链接到 AWS 组织中的 SSO 角色。
  2. 我们希望向用户 X 提供一个 IAM 策略来访问 AWS 账户 A 中的 DynamoDB。

我在账户 A 中创建了 IAM 策略,因为 DynamoDB 特定于 AWS 账户 A。那么,如何使用 AWS CLI 将 IAM 策略附加到用户 X 的 SSO 角色?

amazon-web-services aws-iam-policy aws-sso
1个回答
0
投票

你不能。 AWS 不允许您手动更新 SSO 联合角色/用户的策略(显然)。您需要从 IAM Identity Center 更新用户的 SSO 角色权限集。

aws iam attach-role-policy --role-name AWSReservedSSO_xxxxx_xxxxx --policy-arn <policy_arn>

An error occurred (UnmodifiableEntity) when calling the AttachRolePolicy operation:
Cannot perform the operation on the protected role 'AWSReservedSSO_xxxxx_xxxxx' - this role is only modifiable by AWS
© www.soinside.com 2019 - 2024. All rights reserved.