Courseiva
Design for New Solutions →hardMultiple Choice

Database Strategy for Microservices with Minimal Code Changes

A company is migrating a legacy monolithic application to a microservices architecture on AWS. The application has a relational database with complex queries. The team wants to minimize changes to the existing codebase. Which database migration strategy should be recommended?

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

✓

Use Amazon RDS for MySQL or PostgreSQL with read replicas.

Using Amazon RDS with the same database engine (MySQL or PostgreSQL) minimizes code changes, as the application can connect via standard SQL drivers. Read replicas can help with read scaling without altering the codebase. Option B is wrong because Aurora Serverless may require configuration changes and does not necessarily minimize code changes. Option C is wrong because S3 and Athena are not suitable for transactional relational queries and would require significant architectural changes. Option D is wrong because DynamoDB would require schema redesign and application changes to use NoSQL.

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 Amazon RDS for MySQL or PostgreSQL with read replicas.

    Why this is correct

    RDS for MySQL or PostgreSQL preserves the relational schema and complex SQL, so the application's queries and drivers continue working with minimal code changes. Read replicas offload reporting traffic, and the engine choice matches the existing codebase rather than forcing a rewrite.

  • ✗

    Use Amazon Aurora Serverless to reduce management.

    Why it's wrong here

    Aurora Serverless is still relational and MySQL- or PostgreSQL-compatible, so it does satisfy the complex-query and minimal-code-change requirements; it fails only because the stem asks for a migration strategy, and serverless capacity scaling is an operational choice rather than a database migration approach. It is tempting because it reduces management overhead.

  • ✗

    Store data in Amazon S3 and use Athena for queries.

    Why it's wrong here

    S3 with Athena is a serverless query service over object storage, not a relational database; it lacks transactions, constraints and low-latency point lookups, so the application's data access code would need substantial rewriting. It is tempting for ad-hoc analytics over large datasets, and would be correct if the workload were analytical reporting rather than transactional application queries.

  • ✗

    Migrate to Amazon DynamoDB for scalability.

    Why it's wrong here

    DynamoDB is a key-value and document store without joins or a SQL engine, so complex relational queries would require rewriting the application's data access layer. It is tempting for microservices needing horizontal scale at single-digit millisecond latency, and would be correct if the workload were access-pattern-driven rather than query-driven.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This SAP-C02 question is part of Courseiva's 984-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 →

How Courseiva writes practice questions · Editorial policy

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.