AWS Builder Center

Using AWS DMS for a database migration with almost no downtime, almost

Migrating a production database to a new engine with AWS DMS kept downtime to under two minutes, but the almost in that sentence is the part worth writing about.

The migration needed to move a production database to a different engine entirely, which ruled out simple engine level replication and pointed toward  DMS  as the tool built specifically for this kind of cross engine move.


Running continuous replication


DMS handled the initial full load and then continuous replication of ongoing changes, which meant the new database stayed in sync with production for days while I validated data correctness, without needing a maintenance window until the actual cutover moment.


The almost


Cutover itself meant stopping writes to the old database, letting DMS catch up the last few seconds of changes, and repointing the application, a process that took under two minutes in the end. The almost is that one table with a custom trigger did not replicate its trigger logic automatically, since DMS moves data, not database level objects like triggers, and I only caught that gap during validation, days before cutover, by comparing row counts after simulating the trigger's effect manually.


What I would check first next time


If I did this again, I would inventory every trigger, stored procedure, and constraint on day one instead of assuming DMS would carry structural database objects along with the data, since that assumption is the one thing that could have turned a two minute cutover into a much longer, more stressful one.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article