A SysOps administrator is configuring an AWS CloudTrail organizational trail to log events across all accounts in an AWS Organization. The trail is configured to deliver logs to a centralized Amazon S3 bucket in a dedicated log archive account. The S3 bucket is encrypted using a customer managed AWS KMS key. After configuring the trail, the administrator notices that log files are not appearing in the S3 bucket, and CloudTrail shows a log delivery failure status.
Which action should the administrator take to resolve this issue?
- Update the KMS key policy of the customer managed key to allow the CloudTrail service principal (cloudtrail.amazonaws.com) to perform the kms:GenerateDataKey* action.Cevap
- BAttach an IAM policy to the CloudTrail service-linked role in each member account that grants the kms:GenerateDataKey* permission on the customer managed key.
- CAdd an iam:PassRole permission to the administrator's IAM policy for the CloudTrail service role to delegate key access.
- DEnable detailed monitoring on the centralized Amazon S3 bucket to allow CloudTrail metrics to update at one-minute intervals.
Cevap
Update the KMS key policy of the customer managed key to allow the CloudTrail service principal (cloudtrail.amazonaws.com) to perform the kms:GenerateDataKey* action.
Updating the KMS key policy of the customer managed key to allow the CloudTrail service principal (cloudtrail.amazonaws.com) to perform the kms:GenerateDataKey* action allows CloudTrail to encrypt the logs before writing them to the bucket. Because a customer managed key is used, the key policy must explicitly authorize CloudTrail to use the key.
Adım Adım Çözüm
Anahtar Kavram
AWS KMS key policy configuration for CloudTrail log delivery