A SysOps Administrator is setting up an AWS Systems Manager (SSM) Automation execution to run a custom document. The document will execute a series of diagnostic scripts on a target group of EC2 instances using SSM Run Command. The SSM Agent is installed and running on all target EC2 instances, and an IAM instance profile with the AmazonSSMManagedInstanceCore policy is attached to each instance. A custom IAM service role named SSMAutomationServiceRole has been created with the AmazonSSMAutomationRole policy attached, and its trust policy allows ssm.amazonaws.com to assume the role. The administrator's IAM user policy contains permissions for ssm:StartAutomationExecution and ssm:DescribeDocument. When the administrator attempts to start the automation execution using the AWS CLI and specifies the SSMAutomationServiceRole as the execution role, the execution fails immediately with an access denied error. What action must the administrator take to resolve this failure and allow the automation to run?
- Attach an IAM policy to the administrator's IAM user that allows the iam:PassRole action on the SSMAutomationServiceRole resource.Cevap
- BUpdate the trust policy of the SSMAutomationServiceRole to allow the administrator's IAM user to perform the sts:AssumeRole action.
- CAttach the SSMAutomationServiceRole as a secondary IAM instance profile to the target EC2 instances.
- DAdd the ssm:StartAutomationExecution permission to the EC2 instances' IAM instance profile.