AWS Certified Security – Specialty — Question 328

A company has a web server in the AWS Cloud. The company will store the content for the web server in an Amazon S3 bucket. A security engineer must use an Amazon CloudFront distribution to speed up delivery of the content. None of the files can be publicly accessible from the S3 bucket direct.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Creating an origin access identity (OAI) and associating it with the Amazon CloudFront distribution is the standard method to restrict access to an Amazon S3 bucket so that users can only access content through CloudFront. By updating the S3 bucket policy to allow access only to the OAI, direct public access to the S3 bucket is prevented. Other options, such as using IAM roles for CloudFront or using the distribution ID directly as a principal in the bucket policy, are not supported mechanisms for S3 origin security.