A SysOps Administrator is configuring VPC Flow Logs to deliver network traffic logs to an Amazon S3 bucket. The target S3 bucket is encrypted using SSE-KMS with a customer managed KMS key. After creating the flow log, the administrator notes that the log status is 'Active', but no log files are being delivered to the bucket. Which action should the administrator take to resolve this log delivery issue?
- Update the customer managed KMS key policy to grant the 'delivery.logs.amazonaws.com' service principal permissions for the 'kms:GenerateDataKey*' action.Cevap
- BCreate an IAM service role with the 's3:PutObject' permission, configure the role's trust policy to trust the 'vpc-flow-logs.amazonaws.com' service, and assign this role when creating the flow log.
- CModify the S3 bucket policy to grant the 'vpc-flow-logs.amazonaws.com' service principal write permissions, and disable KMS encryption on the bucket to bypass key policy checks.
- DConfigure the flow logs to write to an intermediate Amazon CloudWatch Logs group with a 'Never Expire' retention policy, then configure an export task to copy the logs to the S3 bucket.
Cevap
Update the customer managed KMS key policy to grant the 'delivery.logs.amazonaws.com' service principal permissions for the 'kms:GenerateDataKey*' action.
For S3 delivery of VPC Flow Logs where the bucket is encrypted with SSE-KMS, the Log Delivery service principal ('delivery.logs.amazonaws.com') requires 'kms:GenerateDataKey*' permissions on the KMS key. This allows the delivery service to generate a data key to encrypt the log objects before writing them to S3.
Adım Adım Çözüm
Anahtar Kavram
VPC Flow Logs Delivery Permissions to SSE-KMS Encrypted S3 Buckets