Courseiva
Security →hardMultiple Choice

DVA-C02 Security Practice Question

Exhibit

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

Refer to the exhibit. An IAM policy allows s3:GetObject for a bucket only from a specific IP range. A developer accesses the bucket from a laptop with IP address 192.0.2.55, but access is denied. What is the most likely reason?

⚠ Common exam trap

Watch out — candidates often assume the laptop's public IP is always used for the request, forgetting that the AWS Management Console acts as a proxy, so the `aws:SourceIp` condition evaluates the console's IP, not the user's.

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 request is made from an AWS service, such as the AWS Management Console, which does not use the laptop's public IP.

When a request is made via the AWS Management Console, the console itself acts as an intermediary. The console's requests originate from AWS service IPs, not the user's laptop public IP. Therefore, the `aws:SourceIp` condition in the IAM policy evaluates against the console's IP, which is not in the allowed range, causing the denial even though the laptop's IP is valid.

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 includes an explicit deny statement elsewhere.

    Why it's wrong here

    The provided exhibit only shows a single IAM policy, and it explicitly contains an Allow effect, not a Deny. In IAM policy evaluation, an explicit deny statement, if present in any applicable policy (identity-based, resource-based, SCPs, etc.), would always override any allow statements. However, since no such deny statement is visible or implied by the question stem, attributing the access failure to an unseen explicit deny is an unsupported assumption.

  • ✗

    The condition key should be 'aws:SourceIp' without the 'IpAddress' wrapper.

    Why it's wrong here

    This statement is incorrect as the syntax used in the policy is valid and standard for IP-based conditions. In IAM policies, 'aws:SourceIp' is the condition key that represents the IP address of the request originator, while 'IpAddress' is the condition operator used to evaluate whether the source IP falls within a specified CIDR range. The structure `"IpAddress": { "aws:SourceIp": "192.0.2.0/24" }` correctly applies the IP address operator to the source IP key.

  • ✗

    The laptop's IP address is not within the allowed range.

    Why it's wrong here

    This option is factually incorrect based on standard CIDR notation. A `/24` CIDR block, such as `192.0.2.0/24`, encompasses all IP addresses from `192.0.2.0` through `192.0.2.255`. The IP address `192.0.2.55` clearly falls within this defined range. Therefore, if the request originated directly from the laptop's IP, the `aws:SourceIp` condition would evaluate to true, making this an invalid reason for access denial.

  • ✓

    The request is made from an AWS service, such as the AWS Management Console, which does not use the laptop's public IP.

    Why this is correct

    This is the correct explanation. When a user interacts with AWS services through the AWS Management Console, the actual API requests to services like S3 are proxied through AWS's own infrastructure. Consequently, the `aws:SourceIp` condition in the IAM policy evaluates against the public IP address of the AWS service endpoint or proxy making the call, not the end-user's laptop IP address. If this AWS-owned IP falls outside the `192.0.2.0/24` range, the condition fails, and access is denied, even if the user's laptop IP is within the allowed range.

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 DVA-C02 question from scratch — 1,135 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 DVA-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 DVA-C02 exam.