SAP-C02 Practice Question: Design Solutions for Organizational Complexity
A company manages multiple AWS accounts using AWS Organizations. They want to enforce that any EC2 instance launched with a public IP address must have a specific security group attached. What is the MOST effective way to enforce this?
⚠ Common exam trap
Many candidates choose AWS Config (Option B) because it is a well-known compliance tool, but they overlook that Config is reactive (detect and remediate) rather than proactive (prevent at the API call), which is the key distinction for 'enforce' in this question.
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
✓
Apply a service control policy (SCP) that denies ec2:RunInstances when the instance has a public IP and does not include the required security group.
Service control policies (SCPs) in AWS Organizations allow you to centrally control the maximum available permissions for all accounts in the organization. By crafting an SCP with a condition that denies ec2:RunInstances when the instance has a public IP (using ec2:AssociatePublicIpAddress) and does not include the required security group (using ec2:SecurityGroup), you can proactively prevent non-compliant instances from being launched at the API level, rather than detecting and remediating after the fact.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create an IAM policy that requires the security group when launching instances with a public IP.
Why it's wrong here
IAM policies are not centralized across accounts.
- ✗
Use AWS Config rules to detect non-compliant instances and automatically terminate them.
Why it's wrong here
Reactive, instances may be exposed temporarily.
- ✗
Use AWS CloudFormation StackSets to deploy a template that only allows instances with the required security group.
Why it's wrong here
Does not prevent direct EC2 console launches.
- ✓
Apply a service control policy (SCP) that denies ec2:RunInstances when the instance has a public IP and does not include the required security group.
Why this is correct
Prevents non-compliant launches.
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 1,660-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 →
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.