Courseiva
mediumMultiple ChoiceObjective-mapped

CAS-004 Practice Question: Given the exhibit, what is the effect of this S3…

Exhibit

Refer to the exhibit.

```
[Security Policy JSON]
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::bucket-name/*",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "10.0.0.0/8"
        }
      }
    },
    {
      "Effect": "Deny",
      "Principal": "*",
      "Action": "s3:*",
      "Resource": "arn:aws:s3:::bucket-name/*"
    }
  ]
}
```

Given the exhibit, what is the effect of this S3 bucket policy on an object stored in 'bucket-name'?

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

All requests to the bucket are denied regardless of source IP.

The S3 bucket policy includes an explicit Deny statement that denies all actions (s3:*) for all principals (*), effectively blocking any request regardless of source IP. Even though there is an Allow statement permitting GetObject from the 10.0.0.0/8 range, the explicit Deny overrides it due to the policy evaluation logic where Deny takes precedence over Allow. Therefore, all requests to the bucket are denied.

Answer analysis

Option-by-option breakdown

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

  • Requests from outside 10.0.0.0/8 are allowed to read objects.

    Why it's wrong here

    No Allow statement for outside IPs, and Deny blocks all.

  • All requests from IPs in 10.0.0.0/8 are allowed to read objects.

    Why it's wrong here

    The explicit Deny overrides the Allow.

  • Only anonymous requests are denied.

    Why it's wrong here

    The Deny applies to all principals, including authenticated ones.

  • All requests to the bucket are denied regardless of source IP.

    Why this is correct

    The Deny statement applies to all actions and all principals, so it denies everything.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

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 CAS-005 question is part of Courseiva's 968-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

Same concept, more angles

1 more way this is tested on CAS-005

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. Based on the exhibit, what is the primary purpose of the condition in this IAM policy?

medium
  • A.Enable encryption in transit for the S3 bucket
  • B.Allow all incoming traffic to the S3 bucket
  • C.Deny access from the specified IP ranges
  • D.Restrict access to requests originating from the specified IP ranges

Why D: The condition in the IAM policy uses the `aws:SourceIp` key to restrict access to requests originating from the specified IP ranges. Option A is incorrect because the condition does not address encryption in transit. Option B is incorrect because the policy does not allow all traffic; it allows only requests from the specified IPs. Option C is incorrect because the policy is an allow with a condition, not a deny statement. The condition effectively limits which IPs can perform the allowed actions, making D the primary purpose.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CAS-005 practice question is part of Courseiva's free CompTIA 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 CAS-005 exam.