SAP-C02 Continuous Improvement for Existing Solutions Practice Question
Exhibit
Refer to the exhibit.
Resource: "arn:aws:ec2:us-east-1:123456789012:instance/*"
Condition:
StringEquals:
ec2:InstanceType:
- "t2.micro"
- "t2.small"An IAM policy condition allows launching EC2 instances only if the instance type is t2.micro or t2.small. A developer tries to launch a t2.medium instance. What happens?
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 launch is denied because t2.medium is not in the allowed list.
The IAM policy condition explicitly allows only t2.micro and t2.small. When the developer tries to launch a t2.medium instance, the condition restricts the allowed types, so the launch is denied. Option D is correct because t2.medium is not in the allowed list. Option A is incorrect because the condition is explicit and no additional policy can override a deny from the condition. Option B is incorrect because the condition applies to both allow and deny. Option C is incorrect because even with an additional Allow for t2.medium, the condition would still deny it unless the condition is modified.
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 launch is denied only if the user does not have a separate policy allowing t2.medium.
Why it's wrong here
No separate policy needed; the condition is binding.
- ✗
The launch succeeds because the condition only allows, not denies.
Why it's wrong here
The condition restricts allowed types.
- ✗
The launch succeeds if the user has an additional Allow for t2.medium.
Why it's wrong here
The condition explicitly allows only t2.micro and t2.small.
- ✓
The launch is denied because t2.medium is not in the allowed list.
Why this is correct
Only allowed types are permitted.
Go deeper
Related to this question
About these practice questions
One of 1,660 original SAP-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 SAP-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 SAP-C02 exam.