SAA-C03 Design Secure Architectures Practice Question
A static website uses an Amazon S3 bucket as the origin for an Amazon CloudFront distribution. The team accidentally configured the S3 bucket policy to allow s3:GetObject to Principal "*", so objects are accessible via direct S3 URLs. They want to ensure objects are retrievable only through CloudFront. What is the best corrective action?
⚠ Common exam trap
Test-takers frequently think enabling S3 static website hosting or versioning solves the access control issue, but neither changes the bucket policy—only explicitly restricting the policy to CloudFront’s identity prevents direct S3 URL access.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Remove public access from the bucket and update the bucket policy to allow GetObject only from CloudFront using the distribution’s SourceArn (and use CloudFront origin access control or origin access identity).
The S3 bucket policy currently allows s3:GetObject from any principal, making objects publicly accessible via direct S3 URLs. By removing public access and updating the policy to restrict GetObject to only requests that originate from the CloudFront distribution (using either Origin Access Control or Origin Access Identity), objects become retrievable exclusively through CloudFront, preventing direct S3 access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Remove public access from the bucket and update the bucket policy to allow GetObject only from CloudFront using the distribution’s SourceArn (and use CloudFront origin access control or origin access identity).
Why this is correct
Configure the S3 bucket to block all public access, then attach a bucket policy that grants s3:GetObject only to the CloudFront origin access control (OAC) identity, using the aws:SourceArn condition to restrict the principal to the exact CloudFront distribution ARN. This creates a hardened origin where the S3 bucket rejects any direct anonymous requests from the internet, while CloudFront's authenticated requests are permitted. Using OAC or OAI ensures the bucket owner has to intentionally authorize only that distribution, eliminating the common mistake of leaving objects publicly readable.
- ✗
Enable S3 static website hosting and disable CloudFront, because website hosting blocks direct object URL access.
Why it's wrong here
S3 static website hosting exposes objects through the website endpoint (e.g., bucket.s3-website-region.amazonaws.com) but does not prevent access via the original REST endpoint; any bucket policy that permits public read keeps direct object URLs working. Website hosting also has no mechanism to restrict requests to a particular origin or distribution, and it lacks native HTTPS support on the custom website endpoint. Removing CloudFront would therefore not secure the content and would forfeit edge caching, TLS termination, and the ability to use features like WAF.
- ✗
Add a WAF rule that rate-limits requests to the S3 bucket domain to make direct access impractical.
Why it's wrong here
AWS WAF is a service you attach to resources like CloudFront or Application Load Balancers, not directly to an S3 bucket, so a WAF rule cannot be applied to the bucket's own domain. Even if you added a rate-limit rule at CloudFront, it only throttles traffic coming through that distribution; browsers or scripts hitting the S3 endpoint directly would bypass the rule entirely. Rate limiting is also a mitigation, not an access control guarantee, and would not stop a low-volume attacker from reading every object.
- ✗
Turn on S3 object versioning so that attackers cannot read previous objects.
Why it's wrong here
Object versioning stores multiple versions of each object to guard against accidental deletion or overwrites, but it has no effect on the bucket policy or the public-read permissions that make objects available via direct URLs. If an object is publicly readable, anyone can still download the current version, and in some cases versioned objects are accessible by including a version ID header. Enabling versioning actually increases the attack surface by retaining older versions that attackers could potentially read if permissions remain permissive.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This SAA-C03 question is part of Courseiva's 935-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAA-C03 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAA-C03 exam.