A SysOps administrator is troubleshooting log delivery for a multi-account setup. AWS CloudTrail in Account B is configured to send logs to a central Amazon S3 bucket in Account A. The S3 bucket is encrypted using an AWS Key Management Service (AWS KMS) customer managed key in Account A. Currently, no logs from Account B are being delivered to the S3 bucket.
Which of the following configuration changes are required to resolve this issue? (Select TWO.)
- Update the Amazon S3 bucket policy in Account A to grant the CloudTrail service principal s3:PutObject permissions for the folder path corresponding to Account B.Answer
- Update the KMS key policy in Account A to allow the CloudTrail service principal to perform the kms:GenerateDataKey* action.Answer
- CModify the IAM role in Account B used by CloudTrail to include kms:GenerateDataKey permissions for Account A's KMS key.
- DEnable detailed monitoring on the CloudTrail configuration in Account B to reduce the delivery interval to 1 minute.
- ECreate an Amazon EventBridge rule in Account B to trigger a Systems Manager Automation document that replicates logs to Account A.
Answer
Updating the Amazon S3 bucket policy in Account A to grant s3:PutObject permissions to the CloudTrail service principal, and updating the AWS KMS key policy in Account A to allow the CloudTrail service principal to perform the kms:GenerateDataKey* action.
To successfully deliver CloudTrail logs across accounts to an encrypted S3 bucket, two distinct permissions must be configured in the destination account (Account A). First, the Amazon S3 bucket policy must allow the CloudTrail service principal (cloudtrail.amazonaws.com) to perform the s3:PutObject action for the folders containing Account B's logs. Second, since a customer managed KMS key is used for encryption, the KMS key policy in Account A must allow the CloudTrail service principal to execute the kms:GenerateDataKey* action to encrypt the objects.
Step-by-Step Solution
Key Concept
Cross-account CloudTrail log delivery requires configuring both the destination S3 bucket policy and the associated KMS key policy to permit the CloudTrail service principal (cloudtrail.amazonaws.com) to write objects and generate data keys.
Alternative Method
If SSE-KMS encryption is not strictly required to be managed via a customer managed key, changing the S3 bucket encryption to use the default Amazon S3 managed key (SSE-S3) would remove the need to configure KMS key policies, though the S3 bucket policy update would still be required.
Estimated Time:2m 0s