A SysOps administrator is configuring a multi-account execution workflow using AWS Systems Manager (SSM) Automation in Account A (). The SSM Automation execution must perform two primary functions: launch a temporary Amazon EC2 instance in Account A and attach a pre-existing IAM role named `EC2DataProcessorRole` to it, and assume a cross-account IAM role named `S3ReaderRole` in Account B () to read data files from an Amazon S3 bucket. The SSM Automation workflow runs under a service role named `SSMExecutionRole` in Account A. Which of the following configuration steps are required to achieve this setup? (Select TWO.)
- In Account A, attach a policy to SSMExecutionRole allowing the iam:PassRole action on the resource arn:aws:iam::111111111111:role/EC2DataProcessorRole, and the sts:AssumeRole action on the resource arn:aws:iam::222222222222:role/S3ReaderRole.Answer
- In Account B, configure the trust policy of S3ReaderRole to allow the principal arn:aws:iam::111111111111:role/SSMExecutionRole to perform the sts:AssumeRole action.Answer
- CIn Account B, configure the trust policy of S3ReaderRole to allow the service principal ssm.amazonaws.com to perform the sts:AssumeRole action.
- DIn Account A, attach a policy to SSMExecutionRole allowing the sts:AssumeRole action on the resource arn:aws:iam::111111111111:role/EC2DataProcessorRole, and the iam:PassRole action on the resource arn:aws:iam::222222222222:role/S3ReaderRole.
- EIn Account A, apply a Service Control Policy (SCP) to explicitly allow the iam:PassRole action to the principal ssm.amazonaws.com across all resources.
Answer
In Account A, attach a policy to SSMExecutionRole allowing iam:PassRole on the EC2DataProcessorRole and sts:AssumeRole on the S3ReaderRole in Account B; and in Account B, configure the trust policy of S3ReaderRole to allow SSMExecutionRole to perform sts:AssumeRole.
The correct options state that the execution role in Account A requires iam:PassRole to assign the EC2 role, and sts:AssumeRole to assume the cross-account role. Concurrently, the trust policy of the cross-account role in Account B must trust the execution role from Account A to authorize the assume role operation.
Step-by-Step Solution
Key Concept
IAM PassRole vs AssumeRole in Multi-Account Service Delegations