Courseiva

SOA-C02 Networking and Content Delivery Practice Question

A company is using Amazon CloudFront to deliver content from an S3 bucket. The SysOps administrator wants to restrict access so that only CloudFront can access the S3 bucket. Which TWO steps should be taken?

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

✓

Configure the S3 bucket policy to grant the OAI s3:GetObject permission.

To restrict access so that only CloudFront can access the S3 bucket, the correct steps are to create an Origin Access Identity (OAI) for the CloudFront distribution (option D) and then configure the S3 bucket policy to grant the OAI s3:GetObject permission (option B). This ensures that only the CloudFront distribution with that OAI can read objects from the bucket, while all other principals are denied access. Option A is incorrect because presigned URLs grant temporary access to individual users, not to CloudFront. Option C is incorrect because signed URLs control viewer access, not origin access. Option E is incorrect because bucket policies reference the OAI, not the distribution ID.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Generate presigned URLs for all objects in the S3 bucket.

    Why it's wrong here

    Presigned URLs grant temporary, time-limited access to specific S3 objects, but they are issued to end users and allow direct downloads from S3, bypassing CloudFront entirely. If you generate presigned URLs for every object, viewers can access the bucket directly, defeating CloudFront's caching, logging, and protection benefits. Additionally, presigned URLs expire, so they are not a viable long-term content delivery mechanism. This approach does not restrict access to CloudFront; it actually opens a separate access path.

  • ✓

    Configure the S3 bucket policy to grant the OAI s3:GetObject permission.

    Why this is correct

    Configuring the S3 bucket policy to grant the OAI s3:GetObject permission is the critical step that makes the origin access control effective. The policy explicitly identifies the OAI as the only principal allowed to read objects, which permits CloudFront to fetch content on behalf of viewers while denying all direct S3 access requests. This is the recommended pattern because it combines the OAI identity with the necessary authorization, ensuring that the S3 bucket remains private and only CloudFront can serve content.

  • ✗

    Configure CloudFront signed URLs to limit viewer access.

    Why it's wrong here

    CloudFront signed URLs are used to restrict who can access your content through CloudFront by requiring a valid signature and expiration time, but they do nothing to protect the S3 origin itself. If the S3 bucket is publicly accessible or has a policy that allows other principals, users can bypass CloudFront and access the objects directly. Therefore, signed URLs are a viewer-access control and cannot be used as an origin-restriction mechanism. To secure the origin, you must use an OAI or OAC combined with a bucket policy that denies all other access.

  • ✓

    Create an Origin Access Identity (OAI) for the CloudFront distribution.

    Why this is correct

    Creating an Origin Access Identity (OAI) is a necessary prerequisite for private S3 origins because it provides CloudFront with a dedicated principal identity that can be used to access the bucket. However, simply creating the OAI does not grant any permissions; you must also attach a bucket policy that allows the OAI to perform s3:GetObject. The OAI is often used in conjunction with bucket policies to ensure that only CloudFront can access the objects, but it must be explicitly authorized. Thus, this step alone is insufficient unless paired with the appropriate S3 bucket policy.

  • ✗

    Set the S3 bucket policy to allow access only from the CloudFront distribution ID.

    Why it's wrong here

    S3 bucket policies support principals such as AWS accounts, IAM roles, and canonical user IDs, but they cannot reference a CloudFront distribution ID. The OAI is the principal that CloudFront assumes when accessing S3, and you must specify its canonical user ID or ARN in the bucket policy. Using the distribution ID as a principal is invalid and will cause the policy to be rejected or to have no effect. This is why the correct approach is to grant the OAI permission, not the distribution ID.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva writes every SOA-C02 question from scratch — 1,169 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SOA-C02 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 SOA-C02 exam.