Course menuSAA-C03

Exams / SAA-C03 / S3 access control / Question 1

SAA-C03 practice question: S3 access control (1 of 2)

Design Secure Architectures A free question from our original SAA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A media company stores downloadable reports in an Amazon S3 bucket and serves them to customers through an Amazon CloudFront distribution.

Every object is encrypted with SSE-KMS using a customer managed key. A penetration test found that the reports can still be downloaded directly from the bucket's S3 URL.

The company must make the objects readable only through this one distribution, without changing how the objects are encrypted.

What should a solutions architect do?

Choose one answer.

  1. A. Create an origin access identity (OAI) for the distribution, grant the OAI s3:GetObject in the bucket policy, and remove all other public access.
  2. B. Use origin access control, allow the CloudFront service principal for this distribution in the bucket and key policies, and block public access.
  3. C. Turn on static website hosting, point CloudFront at the website endpoint, and have the bucket policy allow reads only with a secret header.
  4. D. Require CloudFront signed URLs through a trusted key group on the distribution, and keep the existing bucket policy that allows public reads.
Show the answer and explanation

Answer: B

Explanation

Origin access control (OAC) is the AWS-recommended way to make an S3 bucket readable only through a CloudFront distribution. Unlike the older origin access identity, OAC supports SSE-KMS: the key policy must allow the CloudFront service principal, scoped to the distribution with AWS:SourceArn, just like the bucket policy. Signed URLs and website endpoints do not stop direct access to the bucket.

CloudFront with origin access control reading an SSE-KMS encrypted S3 bucket Users reach the objects through CloudFront, which signs its requests to the S3 bucket with origin access control. The bucket policy and the KMS key policy both allow the CloudFront service principal for this one distribution. A request straight to the S3 URL is denied. Users CloudFront signs with OAC S3 bucket policy: this distribution KMS key policy: this distribution Direct S3 URL denied
Both policies name the same distribution, so CloudFront can read and decrypt the objects while a direct S3 request is refused.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on S3 access control? The 5 full-length practice sets have 10 more S3 access control questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets