SAP-C02 Design for New Solutions Practice Question
A company is building a microservices architecture on Amazon ECS with Fargate. Each service must be isolated and communicate only via APIs. The company needs to enforce that services cannot directly access each other's databases. Which approach should be used?
⚠ Common exam trap
A common mix-up: candidates assume security groups within a single VPC are sufficient for isolation, but the question requires strict enforcement that services cannot directly access each other's databases, which is best achieved by separate VPCs with peering limited to API ports.
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
✓
Create a separate VPC for each service and use VPC peering for API communication only.
Placing each microservice in its own VPC and using VPC peering for API communication only enforces strict network isolation at the VPC boundary. This prevents any direct database access between services, as the peering connection can be configured to allow only specific API ports (e.g., HTTPS 443) and not database ports (e.g., 3306, 5432). This design aligns with the principle of least privilege and ensures that services cannot bypass API gateways to reach each other's databases.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a single VPC with network ACLs to block database ports between services.
Why it's wrong here
NACLs are stateless and less dynamic; they can be complex to manage.
- ✗
Use IAM policies to restrict database access at the API level.
Why it's wrong here
IAM policies control API calls, not direct network access to databases.
- ✗
Place all services in the same VPC and use security groups to restrict database access.
Why it's wrong here
Security groups can restrict but still allow potential lateral movement if misconfigured.
- ✓
Create a separate VPC for each service and use VPC peering for API communication only.
Why this is correct
Separate VPCs provide strong isolation; VPC peering allows controlled API traffic.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.