AWS Certified Security – Specialty (SCS-C02) — Question 39

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 directly.
Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Option B is correct because it uses an origin access control (OAC) to restrict access to the S3 bucket while allowing the CloudFront distribution to access the files. Option A incorrectly suggests permissions on individual files, which does not effectively restrict access as intended. Option C introduces unnecessary complexity with IAM roles that are not needed for this scenario, and Option D is less secure as it may not enforce the necessary restrictions properly.