An organization uses AWS Systems Manager Patch Manager to automate security updates on a fleet of Amazon EC2 instances running Red Hat Enterprise Linux (RHEL). A SysOps administrator is setting up a Maintenance Window to run a custom OS patching automation. The administrator creates a custom SSM Automation document and an IAM service role named PatchingExecutionRole that allows Systems Manager to perform actions on the instances. When the administrator attempts to register the SSM Automation task within the Maintenance Window using the AWS CLI, the operation fails with an AccessDenied exception stating that the user is not authorized to perform iam:PassRole on the resource PatchingExecutionRole.
What is the correct action to resolve this issue and successfully register the task?
- Attach an IAM policy to the SysOps administrator's IAM identity that grants the iam:PassRole permission for the PatchingExecutionRole Amazon Resource Name (ARN).Cevap
- BModify the trust policy of the PatchingExecutionRole to allow the Systems Manager service principal (ssm.amazonaws.com) to perform the sts:AssumeRole action.
- CUpdate the target instances' tags with a key of Patch Group and a value of Production to associate them with the custom patching execution role.
- DModify the default KMS key policy to permit the SysOps administrator's IAM identity to perform the kms:Decrypt and kms:GenerateDataKey actions.