DOP-C02 Security and Compliance Practice Question
Network Topology
Given the above AWS CLI command output, which actions are allowed for the specified policy?
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
✓
ec2:DescribeInstances and s3:GetObject are allowed; s3:ListBucket is denied
The simulate-custom-policy command tests the specified policy against the given actions and resources. For ec2:DescribeInstances, the action is allowed because the policy includes ec2:Describe*. For s3:GetObject, the action is allowed because the policy explicitly allows s3:GetObject. For s3:ListBucket, the action is not allowed because the policy only allows s3:GetObject, not s3:ListBucket. Therefore, ec2:DescribeInstances and s3:GetObject are allowed, while s3:ListBucket is denied. Option B is correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Only s3:GetObject is allowed
Why it's wrong here
This is incorrect because it ignores the separate statement in the IAM policy that explicitly allows ec2:DescribeInstances (or ec2:Describe*). When you evaluate the policy, every action with an Allow effect is permitted; the CLI output would show ec2:DescribeInstances with an 'allowed' decision, so it cannot be omitted from the list of permitted actions.
- ✓
ec2:DescribeInstances and s3:GetObject are allowed; s3:ListBucket is denied
Why this is correct
This matches the policy's allow statements exactly. The IAM policy grants ec2:DescribeInstances (or ec2:Describe*) and s3:GetObject, so requests to describe EC2 instances and get S3 objects will succeed. s3:ListBucket is not covered by any allow statement, so it is denied either by an explicit Deny or by the default implicit deny that applies when no allow matches. The CLI simulation confirms this by returning 'allowed' for the two granted actions and 'denied' for s3:ListBucket.
- ✗
Only ec2:DescribeInstances is allowed
Why it's wrong here
This is incorrect because s3:GetObject also appears as an allowed action in the policy output. While the policy includes an allow for ec2:DescribeInstances, it contains a separate statement allowing s3:GetObject as well. A complete reading of the CLI results must include every action with an 'allowed' decision, so omitting s3:GetObject misrepresents the effective permissions.
- ✗
All three actions are allowed
Why it's wrong here
This is incorrect because s3:ListBucket is not granted by the policy; the CLI output would show an 'explicit deny' or 'implicit deny' for s3:ListBucket because no statement allows it. Only the actions explicitly listed with an Allow effect—ec2:DescribeInstances and s3:GetObject—are permitted. Under IAM's default-deny model, anything not explicitly allowed is denied, so s3:ListBucket cannot be considered 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 |
About these practice questions
One of 1,298 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.