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/8"
}
}
}
]
}Refer to the exhibit. An IAM policy is attached to an IAM user. The user tries to download an object from the S3 bucket 'example-bucket' from an IP address of 10.1.2.3. What will happen?
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 allowed because the condition matches the IP address.
The IAM policy includes a condition that allows s3:GetObject only if the request originates from an IP address within the 10.0.0.0/8 range. The user's IP 10.1.2.3 falls within this range, so the condition is satisfied and the action is allowed. Option A is wrong because a Deny statement is not required; an explicit Allow with a condition is sufficient. Option B is wrong because the policy does explicitly allow the action when the condition is met. Option C is wrong because the bucket policy is not specified and the IAM policy already grants permission; the result does not depend on the bucket policy unless it explicitly denies, but no such policy is shown.
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 request is denied because the policy does not include a Deny statement.
Why it's wrong here
This is incorrect because IAM uses an implicit default deny for any action not explicitly allowed by a policy. An explicit Deny statement is only needed to override an Allow, not to cause a denial—a request is denied simply when no Allow statement matches the request. Here, the policy does contain an Allow statement with a condition that is satisfied, so the absence of a Deny does not result in denial.
- ✗
The request is denied because the policy does not explicitly allow the action.
Why it's wrong here
This is incorrect because the policy in the exhibit does explicitly allow the action; it includes an Allow statement for the S3 action with a condition key. The condition uses the IpAddress operator to restrict the source IP, and the request's source IP (10.1.2.3) falls within the allowed CIDR range 10.0.0.0/8. Since the condition is met, the Allow applies, and the action is permitted.
- ✗
The result depends on the bucket policy.
Why it's wrong here
This is incorrect because for an IAM user in the same AWS account as the S3 bucket, the effective permissions are the union of the IAM user policy and the bucket policy—access is granted if either policy allows it. In this scenario, the IAM user policy already grants the permission via a matching condition, so the result does not depend on the bucket policy. A bucket policy would only be a determining factor in cross-account access or if the IAM policy were insufficient.
- ✓
The request is allowed because the condition matches the IP address.
Why this is correct
This is correct because the policy's condition uses the IpAddress operator to restrict access to requests originating from IP addresses within the CIDR range 10.0.0.0/8. The source IP address of the request, 10.1.2.3, falls within that range (since 10.1.2.3 is between 10.0.0.0 and 10.255.255.255). Therefore, the condition in the Allow statement evaluates to true, and the action is allowed.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
One of 1,013 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.