A company is designing a centralized compliance logging solution on AWS. The architecture consists of multiple member accounts within an AWS Organization and a dedicated Security account. The security team wants to configure AWS CloudTrail in each member account to deliver log files to a single Amazon S3 bucket in the Security account. All log files must be encrypted at rest using a Key Management Service (KMS) key. Which combination of actions is required to configure the encryption and access controls? (Select TWO.)
- In the Security account, create a customer managed KMS key and configure its key policy to allow the AWS CloudTrail service principal to perform kms:GenerateDataKey* and kms:DescribeKey operations.Cevap
- Attach an S3 bucket policy to the destination bucket in the Security account that grants s3:PutObject permissions to the AWS CloudTrail service principal, with conditions restricting access to the organization's trail ARNs.Cevap
- CConfigure the destination S3 bucket to use the default AWS-managed key (aws/s3) for server-side encryption, and modify its policy to delegate encryption permissions to the CloudTrail service principal across all member accounts.
- DAttach a Service Control Policy (SCP) to the member accounts' Organizational Units (OUs) that explicitly grants the s3:PutObject and kms:GenerateDataKey permissions to all member accounts to permit log writing to the Security account.
- EConfigure the S3 bucket policy in the Security account to grant s3:PutObject permissions to the member accounts' root users, relying on each member account's IAM policies to delegate the permission to CloudTrail.
Cevap
To configure secure, cross-account log aggregation with encryption, you must create a customer managed KMS key in the Security account with a key policy allowing the CloudTrail service principal to generate data keys, and apply an S3 bucket policy on the destination bucket in the Security account allowing the CloudTrail service principal to write objects under conditions restricted to the organization's trail ARNs.
The correct configuration requires using a customer managed KMS key because AWS-managed keys cannot be shared cross-account. The KMS key policy must authorize the AWS CloudTrail service principal to generate data keys. Additionally, the S3 bucket policy in the Security account must explicitly trust the CloudTrail service principal to upload log files, using organizational trail conditions to prevent unauthorized write attempts.
Adım Adım Çözüm
Anahtar Kavram
Cross-account resource access and encryption using Customer Managed KMS Keys and S3 Bucket Policies for centralized AWS services.