A SysOps Administrator is configuring an Amazon CloudFront distribution to serve private files from an Amazon S3 bucket. The S3 bucket is encrypted with SSE-KMS using an AWS Key Management Service (AWS KMS) customer managed key. The administrator creates an Origin Access Control (OAC), associates it with the distribution's S3 origin, and updates the S3 bucket policy to allow the CloudFront service principal to retrieve objects. Despite these configurations, when users attempt to access files via CloudFront, they receive an HTTP 403 Forbidden error.
Which of the following actions will resolve this issue?
- Update the key policy of the AWS KMS customer managed key to grant the CloudFront service principal permissions to perform the kms:Decrypt action.Cevap
- BUpdate the S3 bucket policy to grant the CloudFront service principal permission to perform the kms:Decrypt action.
- CConfigure the CloudFront distribution to use an Origin Access Identity (OAI) and enable automatic KMS key decryption in the OAI settings.
- DConfigure the S3 bucket's route table to associate a gateway endpoint for S3 and enable route propagation.
Cevap
Update the key policy of the AWS KMS customer managed key to grant the CloudFront service principal permissions to perform the kms:Decrypt action.
When an S3 bucket is encrypted with an AWS KMS customer managed key (SSE-KMS), CloudFront needs permission to use the KMS key to decrypt the objects it retrieves. Because S3 bucket policies cannot delegate KMS permissions, you must update the KMS key policy to allow the CloudFront service principal (cloudfront.amazonaws.com) to execute the kms:Decrypt action.
Adım Adım Çözüm
Anahtar Kavram
Amazon CloudFront OAC integration with S3 buckets encrypted with AWS KMS customer managed keys.
Tahmini Süre:1m 30s