A SysOps administrator is configuring an Amazon EC2 Auto Scaling group to use a new launch template. The launch template specifies an IAM instance profile associated with an IAM role named 'ApplicationServerRole'. When the administrator attempts to create the launch template, the action fails with an 'Access Denied' error. The administrator already has full administrative access to Amazon EC2, but their IAM permissions are restricted. Which permission must be added to the administrator's IAM policy to resolve this issue?
- Allow the iam:PassRole action on the ApplicationServerRole resource in the administrator's IAM policy.Cevap
- BAllow the sts:AssumeRole action on the ApplicationServerRole resource in the administrator's IAM policy.
- CModify the trust policy of the ApplicationServerRole to allow the administrator's IAM user to assume the role.
- DAllow the iam:AssociateInstanceProfile action on the Auto Scaling group resource in the administrator's IAM policy.
Cevap
Allow the iam:PassRole action on the ApplicationServerRole resource in the administrator's IAM policy.
The correct answer is correct because the iam:PassRole action is specifically designed to control which roles a user can assign to AWS services (like EC2). When creating resources like launch templates that specify service roles, the user's IAM policy must grant permission to pass that role to the service.
Adım Adım Çözüm
Anahtar Kavram
IAM Role Delegation and the iam:PassRole Permission