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.

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.

Study

Keep practising

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