A SysOps Administrator is setting up VPC Flow Logs in Account A to publish network traffic metadata to an Amazon S3 bucket in Account B. The S3 bucket in Account B is configured with default encryption using a customer managed AWS KMS key. The flow logs are failing to deliver to the S3 bucket. Which of the following actions must be taken to successfully deliver the flow logs to the destination S3 bucket? (Select TWO.)
- Modify the S3 bucket policy in Account B to allow the delivery.logs.amazonaws.com service principal to perform s3:PutObject and s3:GetBucketAcl actions.Cevap
- Modify the customer managed KMS key policy in Account B to grant the delivery.logs.amazonaws.com service principal the kms:GenerateDataKey* permission.Cevap
- CCreate an IAM role in Account A with a trust policy for the vpc-flow-logs.amazonaws.com service principal, attach a policy with s3:PutObject permissions for the bucket in Account B, and associate this role with the flow log configuration.
- DModify the policy of the default AWS managed KMS key (aws/s3) in Account B to allow the delivery.logs.amazonaws.com service principal to perform kms:GenerateDataKey* operations.
- EIn Account A, create an IAM role containing the iam:PassRole permission for the log delivery service, and assign the role to the VPC flow log creation request.
Cevap
To deliver cross-account VPC Flow Logs to an S3 bucket encrypted with a customer managed KMS key, the administrator must modify the S3 bucket policy in Account B to allow delivery.logs.amazonaws.com to perform s3:PutObject and s3:GetBucketAcl, and modify the customer managed KMS key policy in Account B to allow delivery.logs.amazonaws.com to perform kms:GenerateDataKey*.
To publish cross-account VPC Flow Logs to an S3 bucket encrypted with a customer managed KMS key, two permissions must be configured. First, the S3 bucket policy in Account B must allow the delivery.logs.amazonaws.com service principal to write objects (s3:PutObject) and read the bucket ACL (s3:GetBucketAcl). Second, the KMS key policy of the customer managed key in Account B must grant the delivery.logs.amazonaws.com service principal the kms:GenerateDataKey* permission to allow encryption of the log files upon delivery.
Adım Adım Çözüm
Anahtar Kavram
Cross-account VPC Flow Logs delivery to an encrypted Amazon S3 bucket requires resource-based permissions (bucket policy and KMS key policy) for the Log Delivery service principal (delivery.logs.amazonaws.com), rather than user-configured IAM roles.