AWS DMS: Moving Databases Without Stopping the World

AWS DMS: Moving Databases Without Stopping the World

A thorough, intermediate-level walkthrough of AWS Database Migration Service — its architecture, internal replication engine, lifecycle, security posture, scaling behavior, and the patterns real teams use to move production data safely.

Picture a hospital that needs to move every patient into a brand-new building, but the catch is the hospital can never actually close — patients keep arriving, treatments keep happening, and nobody can be left waiting in a hallway with no record of their care. The only way to pull this off is to move patients gradually while keeping a live, constantly updated copy of every chart in both buildings until the very last patient has safely crossed over. AWS Database Migration Service, known as DMS, does exactly this for databases: it moves your data to a new home while your original database keeps running, keeping both sides in sync until the moment you are ready to fully switch over.

1Core Concepts: Replication Instances, Endpoints, and Tasks

Three building blocks form the vocabulary of nearly everything DMS does, and getting comfortable with them unlocks the rest of the service.

A replication instance is a managed compute server that DMS runs on your behalf. It does not store your data permanently — instead, it is the engine that reads data out of a source database and writes it into a target database, holding data only briefly in memory and on temporary storage while the transfer is in flight. An endpoint is a connection definition describing either a source or a target — the database engine type, the network address, and the credentials DMS should use to connect. A replication task is the actual instruction set: which tables to migrate, what migration type to use, and how to map data between the source and target.

Simple Analogy

Think of the replication instance as a moving truck, the source and target endpoints as the two addresses printed on the moving order, and the task as the packing list telling the movers exactly which boxes to load, in what order, and where each one goes inside the new house.

Concept

Replication Instance

A managed compute resource that runs the actual data movement process between source and target.

Concept

Source Endpoint

Connection details for the database DMS will read data out of.

Concept

Target Endpoint

Connection details for the database DMS will write data into.

Concept

Replication Task

The configured job defining what to migrate, how, and under which migration type.

Concept

Table Mapping

Rules deciding which schemas and tables are included, excluded, or transformed during migration.

Concept

Change Data Capture (CDC)

The mechanism that continuously reads ongoing changes from the source after the initial data load finishes.

DMS supports three migration types, and choosing correctly among them is the single most consequential decision in any migration plan. A full load migration simply copies existing data once, from the source’s current state, into the target. Full load plus CDC performs that same one-time copy but then keeps listening for ongoing changes on the source and continuously applies them to the target, keeping both databases synchronized indefinitely. CDC only skips the initial bulk copy entirely and assumes the target already has the baseline data, replicating only new changes going forward — useful when a separate backup-and-restore process already handled the bulk of the data.

2Architecture and Components

Understanding how the pieces physically connect explains why network configuration is often the hardest part of a real migration.

graph LR
    A[Source Database] -->|Read via Endpoint| B[Replication Instance]
    B -->|Buffer and Transform| C[Internal Storage]
    C -->|Write via Endpoint| D[Target Database]
    E[CloudWatch] -.Metrics.- B
    F[Table Mappings and Task Settings] -.Configures.- B
        
FIG 1 — The replication instance sits between source and target, driven by task configuration

The replication instance runs inside a Virtual Private Cloud (VPC), which is why network reachability is such a common early hurdle: the instance must have a network path to both the source database and the target database, which frequently means configuring security groups, route tables, and sometimes VPN or peering connections between separate networks — especially when migrating from an on-premises data center into AWS, or between two different cloud accounts.

Internally, the replication instance runs separate processing components for the full load phase and the CDC phase, and these can actually run concurrently on the same task once CDC begins — meaning as the initial bulk copy is still finishing for some tables, ongoing changes for already-completed tables can already be streaming through. This overlapping design is part of why DMS can keep total migration downtime extremely low compared to a simple stop-the-database-and-copy-everything approach.

Homogeneous vs Heterogeneous Migration

A homogeneous migration moves data between the same database engine — for example, one PostgreSQL database to another PostgreSQL database — and is comparatively simple because data types and behaviors match closely. A heterogeneous migration moves between different engines, such as Oracle to PostgreSQL, and requires DMS to translate data types and structures that do not map one-to-one, which is why AWS provides a separate Schema Conversion Tool specifically to prepare the target schema before a heterogeneous DMS task ever begins moving data.

Component

Replication Subnet Group

Defines which subnets within a VPC the replication instance can be placed into for network access.

Component

Schema Conversion Tool

A separate, complementary tool that converts source schema objects into an equivalent target-compatible schema for heterogeneous migrations.

Component

Multi-AZ Replication Instance

An optional standby copy of the replication instance in a second availability zone for higher availability.

Component

Validation Engine

An optional feature that independently compares source and target data after migration to confirm accuracy.

3Internal Working: How Data Actually Moves

Knowing the mechanics behind the full load and CDC phases demystifies why migrations behave the way they do.

During the full load phase, DMS does not naively read one row at a time. It reads data from the source tables in bulk, typically using multiple parallel worker threads across different tables simultaneously, and streams that data toward the target in batches. Tables are, by default, processed independently and in parallel rather than strictly sequentially, which is why total full-load duration is often closer to the time needed for the largest single table than the sum of every table’s individual size.

Once CDC begins, DMS switches to reading the source database’s native transaction log — for example, the binary log in MySQL or the write-ahead log in PostgreSQL — rather than repeatedly querying the tables themselves. This is a crucial internal detail: capturing changes from the transaction log means CDC has minimal performance impact on the live source database, since it is reading a log stream the database engine already produces, rather than running additional queries against the production tables that application traffic is also using.

Simple Analogy

Reading the transaction log is like reading a store’s official receipt tape instead of walking the sales floor every five minutes recounting inventory by hand. The receipt tape already records every transaction as it happens, so watching it causes zero disruption to shoppers still in the store.

PhaseWhat Happens Internally
Full LoadParallel bulk reads across tables, batched writes to target, indexes often deferred until data is loaded
CDCContinuous read of the source transaction log, translating captured changes into target-compatible operations
CutoverApplication traffic is redirected to the target once CDC lag reaches near zero and data is validated

An important internal optimization is that DMS often defers creating secondary indexes and constraints on the target until after the bulk full-load data has already been written. Loading data into a table that has no indexes to maintain is significantly faster than loading into a fully-indexed table, since the database does not need to update index structures for every single inserted row during the bulk copy. Indexes and constraints are then applied afterward, right before CDC begins, restoring the target’s full integrity guarantees before ongoing changes start flowing in.

4Data Flow and Lifecycle

1

Assessment

Source database compatibility is evaluated, and for heterogeneous migrations, the Schema Conversion Tool prepares an equivalent target schema.

2

Full Load

Existing data is bulk-copied from source tables into the already-prepared target schema, table by table, in parallel.

3

Change Data Capture

Once the full load finishes, DMS begins streaming ongoing transaction log changes so the target catches up to the current state of the source.

4

Validation

Row counts and, optionally, row-level content are compared between source and target to confirm the migration’s accuracy.

5

Cutover

Once replication lag is effectively zero, application traffic is redirected to the target database and the source is retired or kept as a fallback.

The gap between the source’s current state and the target’s current state during CDC is called replication lag, and monitoring this single number is the primary way teams know when it is actually safe to cut over. A migration with lag still measured in minutes is not ready for cutover; a migration whose lag has settled near zero and stayed there consistently indicates the target is truly caught up and can safely take over live traffic.

!
Common Misconception

Finishing the full load does not mean the migration is complete. Data continues changing on the source for as long as the application keeps writing to it, so cutover readiness is determined by CDC lag approaching zero, not by the full load’s completion status.

Cutover itself is intentionally not automated by DMS — the decision of exactly when to redirect application traffic belongs entirely to the migrating team, since it usually involves coordinating application configuration changes, DNS updates, or connection string changes that live outside of DMS’s own scope. DMS’s job ends at keeping both sides synchronized; the human-driven moment of switching over is a separate, deliberate step.

5Advantages, Disadvantages, and Trade-offs

Advantages

  • Enables migrations with minimal application downtime through continuous CDC replication
  • Supports both homogeneous and heterogeneous migrations across many popular database engines
  • Fully managed replication instance — no manual patching or scaling of migration servers
  • Built-in validation feature to independently confirm data accuracy after migration
  • Can be used for ongoing replication, not just one-time migration, such as feeding a reporting database continuously

Disadvantages / Trade-offs

  • Heterogeneous migrations require significant upfront schema conversion work outside of DMS itself
  • Certain complex source features, like some stored procedures or triggers, are not automatically migrated
  • Large object data types can slow down full load performance if not tuned carefully
  • Network connectivity between source, replication instance, and target can be a significant setup burden for hybrid environments
  • Replication instance sizing directly affects throughput, requiring some trial and adjustment for very large datasets
“A migration tool that cannot keep two databases in sync while the business keeps running is not really solving the hard part of the problem.”

A frequent trade-off decision is whether to use DMS purely as a one-time migration bridge, decommissioning the replication task once cutover completes, or to keep a DMS task running long-term as a continuous data replication pipeline — for example, constantly streaming production data into a separate analytics database. Both are legitimate uses of the same underlying technology, but they come with different operational expectations: a one-time migration task can tolerate more aggressive tuning for speed, while a permanent replication pipeline needs to be tuned for long-term stability and monitored as a standing piece of infrastructure.

6Performance and Scalability

The size and type of the replication instance is the single biggest lever for migration performance. A replication instance is really just a managed compute server with a certain amount of CPU, memory, and network throughput allocated to it, and larger instance classes can process more tables in parallel and handle larger row batches without becoming a bottleneck.

Parallel
Tables loaded simultaneously by default
Log-based
CDC method minimizing source impact
Tunable
Parallelism settings per large table

For very large individual tables, DMS supports splitting a single table’s full load into multiple parallel segments based on a column range or partition boundaries, effectively allowing one enormous table to be loaded by several worker threads simultaneously rather than as a single long sequential copy. This is one of the highest-impact tuning options for tables containing hundreds of millions of rows, where a naive single-threaded copy could otherwise take an impractically long time.

Simple Analogy

Splitting one giant table into parallel load segments is like moving one massive library not by carrying every book through a single door one at a time, but by opening several doors at once, each crew carrying a different section of the shelves simultaneously.

Scalability during CDC has a different bottleneck than during full load: since CDC applies changes roughly in the order they occurred, the rate of incoming changes on the source database sets a natural ceiling on how fast the target can be kept in sync, regardless of how large the replication instance is. A source database experiencing an unusually heavy write spike can temporarily outpace even a well-tuned replication instance, which is why monitoring replication lag as a trend over time — not just a single snapshot — matters so much for capacity planning.

7High Availability and Reliability

DMS offers an optional Multi-AZ configuration for the replication instance itself, provisioning a synchronously maintained standby copy of the instance in a second availability zone. If the primary replication instance fails, DMS can fail over to the standby automatically, minimizing interruption to an in-progress migration or an ongoing replication pipeline that the business now depends on.

graph TD
    A[Primary Replication Instance - AZ1] -->|Synchronous Standby| B[Standby Replication Instance - AZ2]
    A -->|Normal Operation| C[Target Database]
    B -.Automatic Failover on Failure.-> C
        
FIG 2 — Multi-AZ replication instance providing automatic failover

Reliability also depends heavily on how a task handles interruptions in connectivity to either the source or target. DMS tasks can be configured to automatically resume from the point where they left off after a transient network disruption, rather than restarting the entire migration from the beginning — an essential behavior for long-running migrations of very large databases, where restarting from scratch after every brief network hiccup would make completion practically impossible.

i
Reliability Insight

For a long-running CDC replication pipeline treated as permanent infrastructure rather than a one-time migration, Multi-AZ is generally worth its additional cost, because an unplanned replication instance failure without a standby means manually restarting CDC and potentially reprocessing a backlog of changes.

It is worth being explicit that Multi-AZ protects the replication instance, not the source or target databases themselves — those need their own independent high-availability configuration, since DMS’s reliability guarantees only extend to the piece of infrastructure it directly manages.

8Security

Because a migration task holds credentials for two databases at once and physically transits real production data, security deserves deliberate design.

Control

Encryption in Transit

Connections between the replication instance and both endpoints can be secured using SSL/TLS to protect data as it moves.

Control

Encryption at Rest

Any data temporarily buffered by the replication instance is encrypted using a managed encryption key.

Control

VPC Isolation

The replication instance operates inside a private network boundary, reachable only through explicitly permitted paths.

Control

Least-Privilege Endpoint Credentials

Source and target credentials should be scoped only to the permissions actually needed for migration, not full administrative access.

SECURITY PATTERN-01 Recommended
Problem

Using a database’s full administrative account as the credential for a migration endpoint, because it is the fastest way to guarantee the migration will not fail due to a missing permission.

Why It Matters

If the endpoint configuration or replication instance is ever compromised, an administrative credential grants far more access than migration itself actually requires, turning a data-movement task into a full database compromise risk.

Correct Approach

Create a dedicated migration user on both source and target with only the specific read and write permissions DMS needs for the tables involved, and rotate or disable that account once migration and cutover are fully complete.

For migrations crossing between separate AWS accounts, or between an on-premises data center and AWS, network security groups and, where applicable, VPN or Direct Connect configurations become an extension of the DMS security model — the replication instance can only be as secure as the network path connecting it to two systems that were, until the migration, entirely unaware of each other.

9Monitoring, Logging, and Metrics

Every replication task publishes detailed metrics covering throughput, latency, and error counts, and the single most important metric for any CDC-enabled task is CDCLatencySource and CDCLatencyTarget — measuring how far behind the replication instance is from the source’s transaction log, and how far behind the target is from what the replication instance has already processed, respectively.

MetricWhat It Tells You
CDCLatencySourceHow far behind the replication instance is in reading the source’s change log
CDCLatencyTargetHow far behind the target database is in applying changes already captured
FullLoadThroughputRowsSourceRows per second being read from the source during full load
ValidationFailedOverallCountNumber of rows found to differ between source and target during validation

Task logs provide row-level detail on errors — for example, a data type mismatch that prevents a specific row from being written to the target — and are typically the first place to look when a task reports failures but does not fully halt, since DMS can be configured to either stop entirely on an error or skip the problematic record and continue, depending on how strict the migration needs to be.

i
Practical Tip

Setting an alarm on CDC latency crossing a defined threshold, rather than only checking it manually before a planned cutover, catches a slowly growing backlog early — while there is still time to investigate the cause before it becomes large enough to threaten the migration timeline.

The built-in validation feature deserves its own monitoring attention: rather than assuming a migration succeeded simply because a task shows a “Load complete” status, running validation and watching its mismatch count go to zero provides independent, row-level confirmation that what actually landed in the target matches what existed on the source.

10Deployment and Cloud Integration

A DMS migration is rarely a single command — it is typically the centerpiece of a broader, carefully sequenced project plan. That plan usually begins with running the Schema Conversion Tool for heterogeneous migrations, then provisioning the replication instance and endpoints, then running and monitoring the full load and CDC phases, and finally executing a coordinated cutover involving application configuration changes outside of DMS entirely.

sequenceDiagram
    participant Team as Migration Team
    participant SCT as Schema Conversion Tool
    participant DMS as DMS Replication Instance
    participant Src as Source Database
    participant Tgt as Target Database
    Team->>SCT: Convert schema
    SCT->>Tgt: Create converted schema
    Team->>DMS: Configure task
    DMS->>Src: Read full load data
    DMS->>Tgt: Write full load data
    DMS->>Src: Read transaction log (CDC)
    DMS->>Tgt: Apply ongoing changes
    Team->>Team: Monitor lag until near zero
    Team->>Tgt: Redirect application traffic (cutover)
        
FIG 3 — End-to-end migration workflow around a DMS replication task

DMS also fits naturally into ongoing cloud architectures beyond one-time migration. A common pattern uses a permanent CDC-only task to continuously stream changes from a transactional production database into a separate analytics or data-warehouse target, decoupling reporting workloads from the operational database entirely so that heavy analytical queries never compete with live application traffic for the same database resources.

Multi-Region Migration

Organizations relocating infrastructure between AWS regions — for example, to be closer to a new customer base or to meet a data residency requirement — often use DMS to replicate a live database into the new region ahead of time, keeping both regions synchronized until a planned cutover window, rather than accepting a lengthy maintenance outage during the move.

11Design Patterns and Anti-Patterns

Pattern

Phased Table Grouping

Splitting very large schemas into multiple tasks grouped by table size or business criticality, rather than one task for everything.

Pattern

Parallel Load Segmentation

Explicitly configuring range-based parallel loading for the largest individual tables to reduce total load time.

Pattern

Continuous Replication as Infrastructure

Treating a long-running CDC task as permanent infrastructure with its own monitoring and alerting, rather than a temporary migration artifact.

Pattern

Rehearsed Cutover

Running a full test migration into a staging target well before the real cutover, to validate timing and catch schema issues early.

ANTI-PATTERN-01 Avoid
Problem

Cutting over application traffic to the target the moment the full load reaches “complete,” without checking CDC latency.

Why It’s Harmful

The source database has almost certainly kept changing during and after the full load. Cutting over before CDC has caught up means the application starts reading from a target that is missing recent data.

Correct Approach

Wait until CDC latency has dropped to and remained near zero across a stable observation window before initiating cutover, treating the full-load completion status as only one input among several readiness signals.

ANTI-PATTERN-02 Avoid
Problem

Skipping the built-in validation feature to save time, assuming that a task showing no errors means the data is perfectly accurate.

Why It’s Harmful

Certain data type conversions or silently skipped rows during heterogeneous migrations may not surface as an outright task error, yet still leave subtle inconsistencies between source and target.

Correct Approach

Run validation, especially for heterogeneous migrations, and treat a clean validation report as a required gate before cutover, not an optional nicety.

ANTI-PATTERN-03 Avoid
Problem

Undersizing the replication instance to save cost on what seems like a “simple” migration, without testing at realistic data volume first.

Why It’s Harmful

An undersized instance can turn a planned overnight migration window into a multi-day ordeal, or cause CDC to permanently fall further behind than it can ever catch up to under real production write volume.

Correct Approach

Run a realistic test migration against production-scale data volume before committing to a final replication instance size and a cutover date.

12Best Practices and Common Mistakes

Best Practices

  • Test the full migration process against a realistic copy of production data before the real cutover
  • Monitor CDC latency continuously and set alarms on it well before the planned cutover window
  • Use dedicated, least-privilege database credentials for source and target endpoints
  • Run the built-in validation feature and treat a clean report as a cutover requirement
  • Defer non-essential indexes and constraints until after full load completes for faster bulk copying
  • Group extremely large tables into their own tasks or parallel load segments

Common Mistakes

  • Cutting over based only on full-load completion, ignoring ongoing CDC lag
  • Assuming a heterogeneous migration needs no schema conversion work outside of DMS
  • Leaving broad administrative credentials attached to endpoints long after migration finishes
  • Not accounting for large object columns, which can disproportionately slow full load performance
  • Treating a permanent CDC replication pipeline as a “set it and forget it” task with no ongoing monitoring
!
A Costly Real Mistake

A recurring incident pattern involves a team disabling or deleting the source database shortly after cutover, only to discover a data discrepancy that requires cross-referencing the original source — but the source is already gone. Keeping the original source available, even read-only, for a defined grace period after cutover is a cheap insurance policy against this exact situation.

13Real-World and Industry Examples

Enterprises undergoing large-scale data center exits commonly rely on continuous replication tools like DMS to move mission-critical databases into the cloud without the extended downtime a traditional backup-and-restore migration would require. Media and entertainment companies handling continuously growing catalogs of user and content data have described using managed migration services to move legacy on-premises databases into cloud-native equivalents while keeping customer-facing applications available throughout the transition, rather than scheduling a disruptive maintenance window that customers would notice.

Near-Zero
Typical cutover downtime target for well-planned migrations
Multiple
Database engines supported as sources and targets
Continuous
Ongoing replication use cases beyond one-time migration

Financial services organizations, which typically operate under strict regulatory requirements around data accuracy and auditability, often lean heavily on DMS’s validation feature and detailed task logging as part of a documented migration compliance trail — providing evidence to auditors that a migration preserved data integrity, not just that it technically completed without error.

Read-Replica Offloading Pattern

Some organizations use a permanent CDC-only DMS task to feed a dedicated reporting database that mirrors production in near real time, allowing business intelligence teams to run heavy, long-running queries without ever touching the operational database that customer-facing applications depend on for fast response times.

14Frequently Asked Questions

Q1Does the source database need to go offline during migration?

No. The source database keeps serving live traffic throughout the full load and CDC phases; DMS reads from it without requiring it to stop.

Q2What is the difference between a homogeneous and heterogeneous migration?

A homogeneous migration moves data between the same database engine, while a heterogeneous migration moves between different engines and requires schema conversion beforehand.

Q3Can DMS be used for something other than a one-time migration?

Yes. A CDC-only task can run indefinitely as an ongoing replication pipeline, commonly used to feed analytics or reporting databases continuously.

Q4How do I know when it is safe to cut over to the target?

Watch CDC latency until it drops to and stays near zero across a stable window, and confirm the validation feature reports no meaningful mismatches between source and target.

Q5Does DMS migrate stored procedures and triggers automatically?

Not directly for heterogeneous migrations. Complex database objects like stored procedures typically require conversion through the Schema Conversion Tool or manual rewriting, separate from the row-level data replication DMS performs.

Q6What happens if network connectivity is briefly interrupted during a migration?

A properly configured task can resume from where it left off once connectivity is restored, rather than restarting the entire migration from scratch.

Q7Should I delete the source database immediately after cutover?

It is generally safer to keep the source available, even read-only, for a defined grace period after cutover, in case a data discrepancy needs to be cross-checked against it.

15Summary and Key Takeaways

AWS DMS solves the hardest part of database migration — keeping a business running while its data moves underneath it. By separating the one-time full load from continuous, log-based change data capture, it allows a source database to keep serving live traffic while a target database is built up and kept in sync, right up until a deliberate, human-controlled cutover moment. The intermediate-level mastery of DMS lies less in clicking through the console and more in understanding replication lag as the true readiness signal, sizing the replication instance and parallel load segments for real production data volume, and treating validation as a required gate rather than an optional check.

Key Takeaways

  • Full load, CDC, or both — choosing the right migration type shapes the entire project timeline and risk profile.
  • CDC reads the transaction log — this is why ongoing replication has minimal impact on a live, running source database.
  • Replication lag is the true cutover signal — full-load completion alone is never sufficient to decide it is safe to switch over.
  • Heterogeneous migrations need schema conversion first — DMS moves data, but structural translation between engines happens separately.
  • Validation is a required gate, not a nicety — a task with no errors is not the same as data confirmed to be accurate.
  • Instance sizing and parallel segmentation drive performance — always test against realistic data volume before committing to a cutover date.
  • Keep the source available after cutover — a short grace period protects against discovering a discrepancy with nothing left to compare against.