Courseiva
Security and CompliancemediumMultiple ChoiceObjective-mapped

DOP-C02 Security and Compliance Practice Question

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::example-bucket/*",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "10.0.0.0/16"
        }
      }
    }
  ]
}

An IAM policy is attached to an IAM user. The user reports that they cannot download objects from the S3 bucket 'example-bucket' even though they are connecting from within the 10.0.0.0/16 IP range. What is the MOST likely reason?

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

The user is accessing S3 through a VPC endpoint, but the condition only works for public IP addresses.

The condition 'aws:SourceIp' evaluates the IP address of the requester. However, if the user is accessing S3 through a VPC endpoint, the source IP is a private IP from the VPC, but the condition works only for public IP addresses. Option C is correct. Option A is wrong because the policy allows GetObject. Option B is wrong because the resource is correct. Option D is wrong because the condition is for source IP, not VPC endpoint.

Answer analysis

Option-by-option breakdown

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

  • The policy needs an additional condition for VPC endpoint.

    Why it's wrong here

    The issue is not that an additional VPC endpoint condition is missing. The existing aws:SourceIp condition only evaluates public IP addresses and is not evaluated for traffic routed through a VPC endpoint. Adding a separate VPC-endpoint condition would not fix the already-failing aws:SourceIp check; the policy must replace it with aws:VpcSourceIp or aws:SourceVpce, or restructure the condition to allow both public and endpoint traffic.

  • The policy does not allow the s3:ListBucket action.

    Why it's wrong here

    The s3:ListBucket action is unrelated to retrieving a specific object. For s3:GetObject, the policy only needs permission on the object ARN (e.g., arn:aws:s3:::bucket/*). ListBucket is required only for APIs that list objects or for bucket-level actions, not for object retrieval. The user's reported failure is about accessing an object, so omitting ListBucket cannot be the cause; the denial is still due to the condition key not matching VPC endpoint traffic.

  • The user is accessing S3 through a VPC endpoint, but the condition only works for public IP addresses.

    Why this is correct

    When S3 is accessed through a VPC endpoint, the aws:SourceIp condition key is not populated; it only works for requests originating from public IP addresses. The request's source IP becomes the private IP of the endpoint, but aws:SourceIp is not available at all for VPC endpoint traffic. Therefore, the IpAddress condition using aws:SourceIp will fail, denying the user access. To allow the request, you must use aws:VpcSourceIp to match the endpoint's private IP, or use aws:SourceVpce to allow the specific VPC endpoint ID.

  • The resource ARN is missing the bucket-level permission.

    Why it's wrong here

    GetObject requires an object-level ARN such as arn:aws:s3:::bucket/*, which is what the policy already has. A bucket-level ARN (arn:aws:s3:::bucket) is only appropriate for actions like s3:ListBucket or s3:GetBucketLocation. Since the policy already contains the correct object ARN, the denial is not caused by a missing bucket-level permission. The actual cause is the incompatible `aws:SourceIp` condition, not an overly narrow resource ARN.

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

This DOP-C02 question is part of Courseiva's 1,013-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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