Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
How can a developer ensure that a publicly accessible enterprise website, hosted on Amazon S3 and served through Amazon CloudFront, prevents direct S3 bucket access and serves all content exclusively through CloudFront?
A
Implementing a new origin access control in CloudFront, setting the distribution's origin to utilize this control, and adjusting the S3 bucket policy for CloudFront OAC with necessary permissions.
B
Enabling block public access in the S3 bucket settings, configuring the CloudFront distribution with the S3 bucket as the origin, and updating the bucket policy for CloudFront access.
C
Enabling static website hosting in the S3 bucket settings, specifying index and error documents, and updating the CloudFront origin to point to the S3 bucket's website endpoint.
D
Configuring the CloudFront distribution's origin to include a custom header and updating the S3 bucket policy with conditions based on the aws:RequestTag/tag-key key, matching the custom header's value.