A SysOps administrator is configuring an Amazon EC2 Auto Scaling group (ASG) to launch instances using a new launch template. The launch template specifies an IAM instance profile with an associated IAM role for the instances. When the ASG attempts to launch instances to meet the desired capacity, all launch attempts fail with the status message: "You are not authorized to perform this operation." The administrator verified that the administrator's IAM identity has the necessary permissions to create the ASG and the launch template. Which configuration change will resolve the launch failures?
- AModify the trust policy of the instance profile's IAM role to allow the Auto Scaling service principal (autoscaling.amazonaws.com) to perform the sts:AssumeRole action.
- BCreate a custom service-linked role for the Auto Scaling group and attach a policy that grants the sts:AssumeRole permission to the Auto Scaling group.
- Attach a policy to the administrator's IAM identity that grants the iam:PassRole permission for the ARN of the instance profile's IAM role.Cevap
- DEnable detailed monitoring in the launch template to authorize the Auto Scaling group to send launch status metrics to Amazon CloudWatch.
Cevap
Attach a policy to the administrator's IAM identity that grants the iam:PassRole permission for the ARN of the instance profile's IAM role.
The correct answer is to attach a policy to the administrator's IAM identity that grants the iam:PassRole permission for the ARN of the instance profile's IAM role. AWS requires that any identity configuring an AWS service to act on its behalf must have permission to pass the associated role. Without this permission, the EC2 service cannot associate the IAM role with the newly launched instances, resulting in an authorization error.
Adım Adım Çözüm
Anahtar Kavram
IAM PassRole requirement for EC2 Auto Scaling launches