A retail enterprise manages member accounts within an organization in AWS Organizations. The security team requires that all VPC Flow Logs from all VPCs in all member accounts be centralized into a single Amazon S3 bucket located in a dedicated Logging account. To comply with security policies, all logs must be encrypted at rest using a customer managed KMS key, and the data transfer must not utilize intermediate CloudWatch log groups in the member accounts. Which configuration should the Solutions Architect implement in the central Logging account to enable successful delivery of the VPC Flow Logs?
- AConfigure the S3 bucket policy to grant s3:PutObject and s3:GetBucketAcl permissions to the S3 Log Delivery service principal (delivery.logs.amazonaws.com). Configure the S3 bucket to use the AWS-managed key for Amazon S3 (aws/s3) for encryption.
- Configure the S3 bucket policy to grant s3:PutObject and s3:GetBucketAcl permissions to the S3 Log Delivery service principal (delivery.logs.amazonaws.com). Configure the KMS key policy of the customer managed key to grant kms:GenerateDataKey* and kms:Decrypt permissions to the same service principal.Answer
- CConfigure the S3 bucket policy to grant s3:PutObject permissions to the IAM root principal of each member account. Configure the KMS key policy of the customer managed key to grant kms:GenerateDataKey* and kms:Decrypt permissions to the IAM root principal of each member account.
- DCreate a Service Control Policy (SCP) at the organization root that allows the s3:PutObject and kms:GenerateDataKey* actions for all member accounts. Attach this SCP to the Organizational Units (OUs) containing the member accounts.
Answer
Configure the S3 bucket policy to grant s3:PutObject and s3:GetBucketAcl permissions to the S3 Log Delivery service principal (delivery.logs.amazonaws.com). Configure the KMS key policy of the customer managed key to grant kms:GenerateDataKey* and kms:Decrypt permissions to the same service principal.
The correct configuration grants bucket access and KMS key access directly to the S3 Log Delivery service principal (delivery.logs.amazonaws.com). Since VPC Flow Logs bypass CloudWatch and write directly to S3, the delivery service acts as the writer. Since the destination bucket is in a different account, a customer managed KMS key is required because AWS-managed keys (like aws/s3) do not allow modification of their key policies to trust external service principals or accounts.
Step-by-Step Solution
Key Concept
Cross-account VPC Flow Logs centralization with custom KMS encryption