Courseiva
Design for New SolutionshardMultiple SelectObjective-mapped

How to Migrate a Monolith to Microservices with Minimal Downtime

A company is migrating a monolithic application to microservices on AWS. The current application uses a single Amazon RDS for PostgreSQL database. To avoid tight coupling, each microservice should have its own database. The company needs to minimize downtime during migration. Which THREE strategies should be used?

Quick Answer

The correct answer is to implement the Strangler Fig pattern, adopt a database per service architecture, and use AWS DMS for data migration. This combination works because the Strangler Fig pattern allows you to gradually replace monolithic functionality with microservices, routing traffic to new services while the old system remains live, which directly minimizes downtime. The database per service approach enforces loose coupling by ensuring each microservice owns its data, preventing the tight coupling of a shared schema. AWS DMS then handles the continuous replication and migration of data from the single RDS instance to the new per-service databases with near-zero downtime. On the AWS SAP-C02 exam, this scenario tests your understanding of migration patterns and data isolation; a common trap is choosing a shared database option, which violates the core microservices principle of bounded contexts. Remember the mnemonic “Strangler, Separate, Sync” to recall the three pillars: Strangler Fig for gradual cutover, Separate databases for isolation, and Sync via DMS for minimal disruption.

⚠ Common exam trap

Test-takers frequently think a shared database with separate schemas is sufficient for microservices isolation, but it still creates tight coupling at the schema and transaction level, violating the database-per-service principle required for true decoupling.

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

Design each microservice with its own database.

Designing each microservice with its own database enforces the database-per-service pattern, which is essential for loose coupling and independent deployability. This approach prevents tight coupling at the data layer, allowing each microservice to choose the most appropriate database technology and schema without impacting other services. It directly supports the migration goal of breaking the monolithic application into autonomous components.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Design each microservice with its own database.

    Why this is correct

    Database per service is a microservices best practice.

  • Use a single shared database with separate schemas for each service.

    Why it's wrong here

    Shared database creates tight coupling.

  • Use AWS Database Migration Service (DMS) for ongoing replication.

    Why this is correct

    DMS supports near-zero downtime migration.

  • Implement the Strangler Fig pattern to gradually migrate functionality.

    Why this is correct

    Pattern allows incremental migration with minimal risk.

  • Deploy all microservices on a single large EC2 instance.

    Why it's wrong here

    Not a database strategy.

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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

3 more ways 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 migrating a legacy monolithic application to AWS. The application currently runs on a single server and uses a MySQL database. The company wants to decouple the application into microservices while minimizing changes to the existing code. Which design approach is MOST cost-effective and requires the least code changes?

medium
  • A.Deploy the application on AWS Elastic Beanstalk and use Amazon RDS for MySQL
  • B.Refactor the application into AWS Lambda functions using an API Gateway
  • C.Use AWS App Runner for the existing application and add new microservices as separate App Runner services with a sidecar pattern
  • D.Containerize the application using Docker and run it on Amazon ECS with AWS Fargate, using Amazon RDS for MySQL

Why C: AWS App Runner allows you to run the existing monolithic application with minimal code changes by simply pointing it at a container image or source code, while new microservices can be added as separate App Runner services. The sidecar pattern enables you to attach auxiliary processes (e.g., logging, monitoring) without modifying the core application code, making this the most cost-effective and least disruptive approach for decoupling into microservices.

Variation 2. A company is migrating a legacy monolithic application to AWS. The application currently uses a shared filesystem for storing user-uploaded documents. The company wants to decouple storage and compute, ensure high durability, and minimize operational overhead. Which AWS service should the company use to replace the shared filesystem?

medium
  • A.Amazon EBS
  • B.Amazon EFS
  • C.Amazon S3
  • D.Amazon FSx for Windows File Server

Why C: Amazon S3 is the correct choice because it provides a highly durable (99.999999999% durability), scalable, and fully managed object storage service that decouples storage from compute. Unlike a shared filesystem, S3 allows multiple compute instances (e.g., EC2, Lambda) to access the same documents via HTTP/HTTPS APIs without needing a mounted filesystem, minimizing operational overhead. It also supports features like versioning, lifecycle policies, and cross-region replication, making it ideal for user-uploaded documents in a migration scenario.

Variation 3. A company is migrating a legacy monolithic application to AWS. The application currently uses a shared file system for storing user uploads. The solution architect needs to design a highly available and scalable storage solution that supports concurrent read/write operations from multiple EC2 instances. Which AWS service should be used?

medium
  • A.Amazon FSx for Windows File Server
  • B.Amazon S3 with S3 File Gateway
  • C.Amazon EFS
  • D.Amazon EBS with Multi-Attach enabled

Why C: Amazon EFS provides a fully managed, elastic NFS file system that supports concurrent read/write access from thousands of EC2 instances across multiple Availability Zones. It is designed for high availability and scalability, automatically growing and shrinking as files are added or removed, making it ideal for a shared file system for user uploads in a migrated monolithic application.

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.