A global e-commerce company is designing a new microservice that runs on Amazon EC2 instances in an Auto Scaling Group in the Application Account (account ID 111122223333). The microservice needs to upload transaction records to a centralized Amazon S3 bucket located in a separate Compliance Account (account ID 444455556666). The transaction records contain sensitive customer data and must be encrypted at rest using a Customer Managed Key (CMK) in AWS KMS that is managed in the Compliance Account. The solutions architect must design a secure, cross-account access solution that adheres to the principle of least privilege. Which combination of actions will allow the microservice to securely write the encrypted transaction records to the S3 bucket? (Select TWO.)
- In the Compliance Account, update the KMS CMK key policy to grant the EC2 instance role in the Application Account permissions to perform the kms:GenerateDataKey and kms:Decrypt operations.Answer
- In the Application Account, attach an IAM policy to the EC2 instance role that grants the s3:PutObject permission on the destination S3 bucket, and the kms:GenerateDataKey permission on the KMS CMK in the Compliance Account.Answer
- CIn the Compliance Account, configure the S3 bucket to use the AWS-managed KMS key (aws/s3) for encryption, and update its key policy to grant cross-account permissions to the EC2 instance role.
- DIn the Compliance Account, configure the S3 bucket policy to grant s3:PutObject permission to the EC2 instance role, and omit the IAM policy on the EC2 instance role because resource-based policies alone are sufficient to authorize cross-account access.
- EIn the organization management account, attach a Service Control Policy (SCP) to the Organizational Unit (OU) of the Application Account that explicitly grants the EC2 instance role access to the S3 bucket and the KMS CMK in the Compliance Account.