Question 1,112 of 1,546
Security and CompliancemediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is denied because the explicit Deny statement applies and overrides any Allow. In AWS IAM policy evaluation with IP condition and explicit deny, an Allow statement can grant access only from a specific IP range, but a Deny statement using NotIpAddress will block any request that does not match that range. Since the request originates from 198.51.100.0/24, which falls outside the allowed 192.0.2.0/24 range, the Deny takes precedence—IAM always evaluates explicit Deny rules first, making them unconditional. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your understanding of the order of evaluation: explicit Deny overrides any Allow, even if the Allow’s condition is not met. A common trap is assuming a missing Allow automatically means Deny, but here the Deny is explicit, not implicit. Memory tip: “Deny is the final word—if it says no, no Allow can say yes.”

SOA-C02 Security and Compliance Practice Question

This SOA-C02 practice question tests your understanding of security and compliance. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.

Consider the following IAM policy:
```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "192.0.2.0/24"
        }
      }
    },
    {
      "Effect": "Deny",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": {
        "NotIpAddress": {
          "aws:SourceIp": "192.0.2.0/24"
        }
      }
    }
  ]
}
```

Refer to the exhibit. An IAM user has this policy attached. What is the effect when the user attempts to get an object from my-bucket from an IP address in the range 198.51.100.0/24?

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

Consider the following IAM policy:
```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "192.0.2.0/24"
        }
      }
    },
    {
      "Effect": "Deny",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": {
        "NotIpAddress": {
          "aws:SourceIp": "192.0.2.0/24"
        }
      }
    }
  ]
}
```

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

Denied because the Deny statement applies

The policy has an Allow statement that grants s3:GetObject only from IP range 192.0.2.0/24. It also has a Deny statement that denies s3:GetObject from any IP not in that range (via NotIpAddress). Since the request comes from 198.51.100.0/24, which is not in the allowed range, the Deny statement applies and overrides any Allow. The request will be denied. Option C is correct. Option A is wrong because the Deny explicitly denies it. Option B is wrong because the Allow only applies to the specified range. Option D is wrong because the Deny is explicit.

Key principle: ACLs process entries top to bottom and stop at the first match. Entry order and interface direction matter as much as the permit or deny statement.

Answer analysis

Option-by-option breakdown

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

  • Allowed because the Deny condition does not match

    Why it's wrong here

    The Deny condition does match because the IP is not in the allowed range.

  • Denied because there is no explicit Allow for that IP range

    Why it's wrong here

    There is an explicit Deny.

  • Allowed because there is an Allow statement

    Why it's wrong here

    The Deny overrides the Allow.

  • Denied because the Deny statement applies

    Why this is correct

    The Deny statement explicitly denies access from IPs not in the range.

    Related concept

    Standard ACLs match source addresses.

Common exam traps

Common exam trap: ACLs stop at the first match

ACLs are processed top to bottom. The first matching entry wins, and an implicit deny usually exists at the end.

Detailed technical explanation

How to think about this question

ACL questions test precision: source, destination, protocol, port and direction. A generally correct ACL can still fail if it is applied on the wrong interface or in the wrong direction.

KKey Concepts to Remember

  • Standard ACLs match source addresses.
  • Extended ACLs can match source, destination, protocol and ports.
  • The first matching ACL entry is used.
  • There is usually an implicit deny at the end.

TExam Day Tips

  • Check inbound versus outbound direction.
  • Read the ACL from top to bottom.
  • Look for a broader permit or deny above the intended line.

Key takeaway

ACLs process entries top to bottom and stop at the first match. Entry order and interface direction matter as much as the permit or deny statement.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Review ACL processing order, placement rules (standard near destination, extended near source), and inbound vs outbound direction. Study wildcard masks and implicit deny. Then practise related SOA-C02 ACL questions on filtering logic and placement.

Related practice questions

Related SOA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SOA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SOA-C02 question test?

Security and Compliance — This question tests Security and Compliance — Standard ACLs match source addresses..

What is the correct answer to this question?

The correct answer is: Denied because the Deny statement applies — The policy has an Allow statement that grants s3:GetObject only from IP range 192.0.2.0/24. It also has a Deny statement that denies s3:GetObject from any IP not in that range (via NotIpAddress). Since the request comes from 198.51.100.0/24, which is not in the allowed range, the Deny statement applies and overrides any Allow. The request will be denied. Option C is correct. Option A is wrong because the Deny explicitly denies it. Option B is wrong because the Allow only applies to the specified range. Option D is wrong because the Deny is explicit.

What should I do if I get this SOA-C02 question wrong?

Review ACL processing order, placement rules (standard near destination, extended near source), and inbound vs outbound direction. Study wildcard masks and implicit deny. Then practise related SOA-C02 ACL questions on filtering logic and placement.

What is the key concept behind this question?

Standard ACLs match source addresses.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on SOA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Refer to the exhibit. An IAM policy is attached to a user. What is the effective permission regarding the s3:DeleteObject action on the example-bucket?

easy
  • A.Denied because of the explicit Deny statement
  • B.Denied because the action is not allowed explicitly
  • C.Allowed because the Allow statement is listed first
  • D.Allowed because the Deny statement has a typo

Why A: In IAM, an explicit Deny overrides any Allow. So even though the first statement allows all S3 actions, the second statement explicitly denies DeleteObject. Thus DeleteObject is denied. Option B is correct. Options A, C, D are incorrect because Deny prevails.

Variation 2. Refer to the exhibit. An IAM user has this policy attached. The user tries to start an EC2 instance that has no tags. What will happen?

medium
  • A.The user will be allowed because the condition only applies if the tag exists
  • B.The user will be allowed because the resource ARN includes a wildcard
  • C.The user will be allowed because the policy does not explicitly deny the action
  • D.The user will be denied because the instance does not have the required tag

Why D: Option A is correct because the policy allows actions only on instances with the tag Environment=Production. Since the instance has no tags, the condition is not met, and the action is not allowed. The user will be denied. Option B is incorrect because the condition uses StringEquals, which requires the tag to exist and match. Option C is incorrect because without the tag, the condition fails, resulting in implicit deny. Option D is incorrect because the policy does not allow all instances; it has a condition.

Last reviewed: Jun 20, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.