【发布时间】:2021-05-17 16:56:02
【问题描述】:
如何通过友好名称而不是 secretARN 从 Secrets manager 跨账户访问密钥?
场景:
- AccountA 中的 CMK KMS - AccountB 附加的密钥策略
- 存储在 AccountA 中的机密 - 添加到 AccountB 的资源策略
- AccountB 中的 EC2 附加了 IAM 角色(秘密和 cmk kms)
观察: 通过调用 --secret-id (ARN) of secrets 来获取秘密细节工作正常,我得到所需的输出
问题:
aws secretsmanager get-secret-value --secret-id (friendlyName) --region region
通过调用 --secret-id (friendlyName) of secrets 获取机密详细信息失败并出现错误
调用 GetSecretValue 操作时发生错误 (AccessDeniedException):用户:arn:aws:sts::111111111:assumed-role/xxxx-xxxx-Role/i-xxxxx 无权执行:secretsmanager:GetSecretValue on resource : (友好名称)
【问题讨论】:
标签: amazon-web-services aws-secrets-manager