A retail company is designing a new centralized transaction auditing solution. The application tier runs on Amazon EC2 instances within an Application account (Account A). The application must write transaction logs to an Amazon S3 bucket located in a dedicated Security account (Account B). The logs must be encrypted at rest using AWS KMS. The security team requires that the Security account (Account B) must maintain full ownership and control over all uploaded log files to enforce lifecycle retention policies. Which configuration strategy should the solutions architect implement to meet these requirements?
- ACreate a Service Control Policy (SCP) at the Organization root that grants Account A's IAM role s3:PutObject permissions for Account B's S3 bucket. Configure a customer managed KMS key in Account B, and update its key policy to trust all accounts in the AWS Organization.
- BConfigure the S3 bucket in Account B to use the default AWS-managed KMS key (aws/s3). Update Account B's S3 bucket policy to allow the IAM role in Account A to perform s3:PutObject actions, and configure S3 Object Ownership on the bucket to Bucket Owner Enforced.
- Configure a customer managed KMS key in Account B, and update its key policy to allow the IAM role in Account A to perform kms:GenerateDataKey and kms:Decrypt actions. Update Account B's S3 bucket policy to allow the IAM role in Account A to perform s3:PutObject actions, and configure S3 Object Ownership on the bucket to Bucket Owner Enforced.Answer
- DConfigure a customer managed KMS key in Account B, and update its key policy to allow the IAM role in Account A to perform kms:GenerateDataKey and kms:Decrypt actions. Configure the IAM role in Account A with permissions to perform s3:PutObject on the bucket in Account B, and rely on this local IAM policy to grant the cross-account access without modifying Account B's S3 bucket policy.
Answer
Configure a customer managed KMS key in Account B, allow Account A's IAM role to use it, grant s3:PutObject permissions in Account B's bucket policy, and set S3 Object Ownership to Bucket Owner Enforced.
The correct strategy is to use a customer managed KMS key in Account B, configure its key policy to allow Account A's IAM role to generate data keys, allow s3:PutObject in Account B's bucket policy, and enable S3 Object Ownership Bucket Owner Enforced. Using a customer managed KMS key allows cross-account policy updates, which is not possible with AWS-managed keys. Specifying Bucket Owner Enforced disables S3 ACLs and automatically transfers ownership of all uploaded objects to Account B, satisfying the ownership and control requirement.
Step-by-Step Solution
Key Concept
Cross-account security and compliance control design using KMS key policies, S3 bucket policies, and S3 Object Ownership settings.