Hard1 markMultiple Choice
Domain 4.2: New Architecture DesignModernizationMicroservicesArchitecture Patterns

AWS SAP-C02 · Question 32 · Domain 4.2: New Architecture Design

A company is refactoring a legacy monolithic application into microservices. The legacy application uses a single relational database. The architect wants to ensure that each new microservice manages its own data independently, but they still need to perform complex queries across data owned by multiple microservices. What is the BEST architectural pattern?

Answer options:

A.

Keep the single relational database and allow all microservices to connect to it directly.

B.

Database-per-service pattern with an event-driven architecture to replicate data to a central data lake for complex queries.

C.

Use AWS Step Functions to orchestrate synchronous API calls between microservices to gather data for queries.

D.

Migrate all data to Amazon DynamoDB and use DynamoDB Streams to perform table joins.

How to approach this question

Apply the microservices 'database-per-service' pattern and use CQRS/Event Sourcing concepts for analytics.

Full Answer

B.Database-per-service pattern with an event-driven architecture to replicate data to a central data lake for complex queries.✓ Correct
Database-per-service pattern with an event-driven architecture to replicate data to a central data lake for complex queries.
In a microservices architecture, each service should own its data (Database-per-service). To perform complex queries across domains, use event streams (e.g., Kinesis, EventBridge) to replicate data to a central data lake or data warehouse (like S3/Athena or Redshift).

Common mistakes

Keeping the shared database, which defeats the purpose of microservices.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 1

75 questions · hints · full answers · grading

More questions from this exam