Courseiva
Question 1,628 of 1,660
Accelerate Workload Migration and ModernizationeasyMultiple ChoiceObjective-mapped

SAP-C02 Practice Question: Accelerate Workload Migration and Modernization

A company is migrating a monolithic Java application to AWS. The current architecture uses a single Oracle database. The migration plan is to refactor the application into microservices and use separate Amazon RDS for PostgreSQL databases per service. The company also wants to implement a CI/CD pipeline using AWS CodePipeline and AWS CodeBuild. Which tool should the company use to automate the database schema changes for each microservice?

⚠ Common exam trap

A common mix-up: candidates confuse data migration tools (like AWS DMS) with schema migration tools, or assume that any scripting approach (like AWS CLI) is sufficient, overlooking the need for version control, repeatability, and integration with application deployment pipelines that Flyway provides.

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

Flyway, integrated into the CI/CD pipeline to run database migrations as part of the application deployment.

Flyway is a database migration tool that integrates directly into CI/CD pipelines, allowing schema changes to be version-controlled and applied automatically during application deployment. For a microservices architecture with separate PostgreSQL databases, Flyway can manage each service's schema independently, ensuring consistency and rollback capability. This aligns with the requirement to automate schema changes per microservice as part of the migration and modernization effort.

Answer analysis

Option-by-option breakdown

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

  • Flyway, integrated into the CI/CD pipeline to run database migrations as part of the application deployment.

    Why this is correct

    Flyway is a well-known database migration tool that can be integrated into CodePipeline for versioned schema changes.

  • AWS Database Migration Service (DMS) to continuously replicate schema changes from the source Oracle database.

    Why it's wrong here

    DMS is for data migration, not for managing schema versions in a new database.

  • AWS CloudFormation with custom resource Lambda functions to run SQL scripts.

    Why it's wrong here

    CloudFormation is for infrastructure, not a standard database schema migration tool; custom resources add complexity.

  • AWS CLI scripts executed in CodeBuild to run SQL commands against the target databases.

    Why it's wrong here

    Manual scripts are error-prone and not a best-practice for automated schema versioning.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.