A SysOps Administrator is configuring an AWS Systems Manager State Manager association to execute a custom Automation document that runs on a fleet of Amazon EC2 instances. The target instances have the Systems Manager (SSM) Agent installed and active, and they are targeted using the tag `Environment: Production`. The instances also have the necessary IAM instance profile attached. During the creation of the State Manager association, the administrator specifies a custom IAM service role to allow Systems Manager to execute the Automation workflow. However, the creation of the association fails immediately with an AccessDenied error.
Which of the following is the most likely root cause of this failure?
- AThe Gateway VPC Endpoint for S3 is not associated with the route tables of the subnets where the target EC2 instances reside.
- BThe target EC2 instances have a patch group tag misalignment, preventing the State Manager association from registering them as managed nodes.
- The administrator's IAM user policy does not grant the `iam:PassRole` permission for the custom IAM service role.Answer
- DThe customer managed KMS key policy lacks permission to allow the administrator to encrypt the State Manager association metadata.
Answer
The administrator's IAM user policy does not grant the `iam:PassRole` permission for the custom IAM service role.
The correct answer is that the administrator's IAM user policy does not grant the `iam:PassRole` permission for the custom IAM service role. When setting up a State Manager association or Automation workflow that uses a service role to perform actions, the IAM user creating the association must have permission to pass that role to the Systems Manager service.
Step-by-Step Solution
Key Concept
IAM PassRole Permission for Systems Manager Automation and State Manager