A SysOps administrator is configuring a third-party monitoring application running on Amazon EC2 instances in a Shared Services account (). The application needs to analyze logs stored in an Amazon S3 bucket within a Production account (). The S3 bucket is encrypted with an AWS KMS Customer Managed Key (CMK) in the Production account. The application runs under an IAM instance profile associated with a role named `EC2MonitorRole` in the Shared Services account, and it must assume an IAM role named `CrossAccountReaderRole` in the Production account to read the S3 objects. Which of the following configuration steps are required to establish this cross-account access? (Select TWO.)
- Modify the trust policy of the `CrossAccountReaderRole` in the Production account () to allow the `sts:AssumeRole` action for the `arn:aws:iam::333333333333:role/EC2MonitorRole` principal.Answer
- Attach a permissions policy to the `EC2MonitorRole` in the Shared Services account () that allows the `sts:AssumeRole` action on `arn:aws:iam::444444444444:role/CrossAccountReaderRole`.Answer
- CAttach an IAM policy to the `EC2MonitorRole` in the Shared Services account () that grants the `iam:PassRole` permission for the `arn:aws:iam::444444444444:role/CrossAccountReaderRole` resource.
- DAttach an IAM permissions policy directly to the `EC2MonitorRole` in the Shared Services account () allowing the `kms:Decrypt` action on the KMS CMK in the Production account (), without modifying the KMS key policy.
Answer
Modify the trust policy of the target role in the Production account to trust the source role, and attach an IAM policy to the source role allowing it to assume the target role.
Establishing cross-account access requires configuring permissions on both sides of the trust boundary. First, the source role must have permissions to initiate the assume-role request. Second, the target role's trust policy must list the source role as a trusted principal to allow the request.
Step-by-Step Solution
Key Concept
Cross-account trust delegation using IAM roles and AWS STS.