Database per Service, API Gateway, Event Sourcing
A company is modernizing a legacy application by breaking it into microservices. The application currently uses a single relational database. The company wants to adopt a microservices architecture with separate databases per service. Which THREE patterns should the company consider? (Choose THREE.)
Quick Answer
The correct answer is Database per Service, API Gateway, and Event Sourcing. Database per Service is the foundational pattern for microservices on AWS, ensuring each service owns its private data store to avoid tight coupling, which directly addresses the company’s goal of breaking away from a single relational database. API Gateway provides a single entry point for routing client requests to the appropriate microservice, handling authentication and throttling—a critical pattern for managing distributed services. Event Sourcing maintains data consistency across services by capturing state changes as an immutable event log, solving the distributed data problem without falling back to a shared database, which is an anti-pattern. On the SAP-C02 exam, this trio tests your ability to design decoupled, resilient architectures; a common trap is confusing CQRS with Event Sourcing, but remember that Event Sourcing is about recording facts, not separating reads and writes. Memory tip: “D-A-E” for Database, API, Events—think “DAE” as in “Don’t Assume Everything” is a shared database.
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
✓
API Gateway
(API Gateway) is correct for routing requests to appropriate microservices. Option C (Database per Service) is correct as it aligns with the requirement for separate databases per service. Option D (Event Sourcing) is correct for maintaining data consistency across services. Option B (Shared Database) is incorrect because it would create coupling. Option E (CQRS) is incorrect because it is a pattern for read/write separation, not a primary pattern for microservices with separate 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.
- ✓
API Gateway
Why this is correct
API Gateway provides a single entry point for microservices.
- ✗
Shared Database
Why it's wrong here
Shared database couples services, violating microservices principles.
- ✓
Database per Service
Why this is correct
Each microservice has its own database.
- ✓
Event Sourcing
Why this is correct
Event Sourcing helps maintain consistency across services.
- ✗
Command Query Responsibility Segregation (CQRS)
Why it's wrong here
CQRS is optional and not a core pattern for microservices migration.
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 →
Same concept, more angles
1 more way this is tested on SAP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is modernizing its monolithic application by breaking it into microservices. The application uses a shared MySQL database. The team wants to implement a database per microservice pattern. Which AWS service should be used to manage multiple databases efficiently?
medium- ✓ A.Amazon RDS for MySQL with multiple DB instances
- B.Amazon ElastiCache for Redis
- C.Amazon DynamoDB
- D.Amazon EFS
Why A: Amazon RDS for MySQL can manage multiple DB instances, each dedicated to a microservice, with managed backups, scaling, and maintenance. Option B (Amazon ElastiCache for Redis) is wrong because it is a caching layer, not a primary database. Option C (Amazon DynamoDB) is wrong because it is a NoSQL database, which may not suit all microservices, especially those requiring relational data. Option D (Amazon EFS) is wrong because it is a file storage service, not a database.
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.