A retail corporation manages member accounts in AWS Organizations. They need to aggregate VPC Flow Logs from all VPCs in all accounts into a single S3 bucket in a dedicated Logging account. The logs must be encrypted at rest using an AWS KMS Customer Managed Key (CMK). The security team requires that the configuration uses the most operationally efficient method and conforms to the principle of least privilege, preventing member accounts from having direct IAM write access to the central S3 bucket.
Which TWO of the following configurations are required to implement this centralized logging solution?
- Configure the bucket policy on the centralized S3 bucket in the Logging account to allow the delivery.logs.amazonaws.com service principal to perform s3:PutObject and s3:GetBucketAcl actions, restricted by a condition matching the AWS Organization ID.Answer
- Configure the key policy of the Customer Managed Key (CMK) in the Logging account to grant the delivery.logs.amazonaws.com service principal kms:GenerateDataKey* permissions, restricted by a condition matching the AWS Organization ID.Answer
- CEnable default S3 bucket encryption using the AWS-managed KMS key for S3 (aws/s3), and apply a Service Control Policy (SCP) at the Organization root that allows cross-account access to this key for all member accounts.
- DConfigure an IAM role in each member account with permissions to write to the central S3 bucket, and configure VPC Flow Logs in each member account to assume this IAM role when delivering logs.
- EShare the central S3 bucket using AWS Resource Access Manager (RAM) with the entire AWS Organization, allowing member accounts to directly select the shared bucket as the destination when creating VPC Flow Logs.
Answer
Configure the bucket policy on the centralized S3 bucket to allow the delivery.logs.amazonaws.com service principal to perform s3:PutObject and s3:GetBucketAcl actions restricted by the AWS Organization ID, and configure the key policy of the Customer Managed Key (CMK) to grant the delivery.logs.amazonaws.com service principal kms:GenerateDataKey* permissions restricted by the AWS Organization ID.
The correct solution involves configuring the centralized S3 bucket policy to allow the delivery.logs.amazonaws.com service principal to execute s3:PutObject and s3:GetBucketAcl actions, while also configuring the Customer Managed Key (CMK) key policy to allow the same service principal to execute kms:GenerateDataKey* actions. Both policies should be restricted to the AWS Organization ID using the aws:PrincipalOrgID condition. This setup ensures that the native log delivery service can write encrypted logs to the central bucket on behalf of all accounts within the organization without needing IAM roles or compromising the principle of least privilege.
Step-by-Step Solution
Key Concept
Cross-account VPC Flow Logs delivery to a centralized S3 bucket encrypted with a KMS CMK requires granting permissions to the delivery.logs.amazonaws.com service principal in both the S3 bucket policy and the KMS key policy.