SAP-C02 第 480 题
题目
A solutions architect is creating an AWS CloudFormation template from an existing manually created non-production AWS environment. The CloudFormation template can be destroyed and recreated as needed. The environment contains an Amazon EC2 instance. The EC2 instance has an instance profile that the EC2 instance uses to assume a role in a parent account. The solutions architect recreates the role in a CloudFormation template and uses the same role name. When the CloudFormation template is launched in the child account, the EC2 instance can no longer assume the role in the parent account because of insufficient permissions What should the solutions architect do to resolve this issue?
中文翻译:
解决方案架构师正在从现有手动创建的非生产 AWS 环境创建 AWS CloudFormation 模板。 CloudFormation 模板可以根据需要销毁和重新创建。该环境包含一个 Amazon EC2 实例。 EC2 实例具有一个实例配置文件,EC2 实例使用该配置文件承担父账户中的角色。解决方案架构师在 CloudFormation 模板中重新创建角色并使用相同的角色名称。当在子账户中启动 CloudFormation 模板时,由于权限不足,EC2 实例无法再承担父账户中的角色。解决方案架构师应该如何解决此问题?
选项
A. In the parent account, edit the trust policy for the role that the EC2 instance needs to assume. Ensure that the target role ARN in the existing statement that allows the sts:AssumeRole action is correct. Save the trust policy.
中文翻译:
在父账户中,编辑 EC2 实例需要承担的角色的信任策略。确保允许 sts:AssumeRole 操作的现有语句中的目标角色 ARN 正确。保存信托政策。
B. In the parent account, edit the trust policy for the role that the EC2 instance needs to assume. Add a statement that allows the sts:AssumeRole action for the root principal of the child account. Save the trust policy.
中文翻译:
在父账户中,编辑 EC2 实例需要承担的角色的信任策略。添加一条语句,允许子账户的根主体执行 sts:AssumeRole 操作。保存信托政策。
C. Update the CloudFormation stack again. Specify only the CAPABILITY_NAMED_IAM capability.
中文翻译:
再次更新 CloudFormation 堆栈。仅指定 CAPABILITY_NAMED_IAM 功能。
D. Update the CloudFormation stack again. Specify the CAPABILITY_IAM capability and the CAPABILITY_NAMED_IAM capability.
中文翻译:
再次更新 CloudFormation 堆栈。指定 CAPABILITY_IAM 功能和 CAPABILITY_NAMED_IAM 功能。
答案
A
解析
正确答案:A 解析: 本题应选择 A。 正确选项: A. 在父账户中,编辑 EC2 实例需要承担的角色的信任策略。确保允许 sts:AssumeRole 操作的现有语句中的目标角色 ARN 正确。保存信托政策。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性、安全性、RTO/RPO、合规要求等。本题相关考点主要包括:EC2、I...