Skip to Content

DMS and schema conversion

AWS Database Migration Service for homogeneous and heterogeneous migrations, sources and targets, schema conversion with SCT or DMS Schema Conversion, continuous replication, Multi-AZ, and migrating RDS and external databases to Aurora.

AWS DMS

AWS Database Migration Service (DMS) migrates databases to AWS quickly and securely; it's resilient and self-healing.

  • The source database remains available during the migration.
  • Supports:
    • homogeneous migrations: for example Oracle to Oracle;
    • heterogeneous migrations: for example Microsoft SQL Server to Aurora.
  • Continuous data replication using CDC (change data capture).
  • A replication instance is created (an EC2 instance managed by DMS) to perform the replication tasks.

Updated since the slides

DMS Serverless now provisions and scales the replication capacity automatically, so no replication instance needs sizing. DMS Schema Conversion converts schemas in the console as a managed alternative to downloading SCT, and DMS Fleet Advisor inventories the source databases.

Sources and targets

Sources:

  • on-premises and EC2 databases: Oracle, MS SQL Server, MySQL, MariaDB, PostgreSQL, MongoDB, SAP, Db2;
  • Azure SQL Database (and other clouds' databases);
  • Amazon RDS, including Aurora;
  • Amazon S3;
  • DocumentDB.

Targets:

  • on-premises and EC2 databases: Oracle, MS SQL Server, MySQL, MariaDB, PostgreSQL, SAP;
  • Amazon RDS (and Aurora);
  • Redshift, DynamoDB, S3;
  • OpenSearch Service;
  • Kinesis Data Streams;
  • Apache Kafka;
  • DocumentDB and Amazon Neptune;
  • Redis and Babelfish.

Schema conversion (SCT)

  • The AWS Schema Conversion Tool (SCT) converts a database's schema from one engine to another.
  • Example OLTP: SQL Server or Oracle → MySQL, PostgreSQL, Aurora.
  • Example OLAP: Teradata or Oracle → Amazon Redshift.
  • Prefer compute-intensive instances to optimize data conversions.
  • SCT is not needed when migrating to the same DB engine:
    • for example, on-premises PostgreSQL → RDS PostgreSQL;
    • the DB engine is still PostgreSQL (RDS is just the platform).

Continuous replication

Migrating with AWS DMS: the source Oracle database in the data center stays live while a DMS replication instance runs a full load and then continuous change data capture into the target Aurora MySQL database; because the engines differ, the AWS Schema Conversion Tool converts the schema first Migrating with AWS DMS: the source Oracle database in the data center stays live while a DMS replication instance runs a full load and then continuous change data capture into the target Aurora MySQL database; because the engines differ, the AWS Schema Conversion Tool converts the schema first

Convert the schema once, then copy and keep in sync.
  1. A server with AWS SCT converts the Oracle schema and creates it in the target (Aurora MySQL or RDS for MySQL).
  2. The DMS replication instance does a full load of the data, then CDC keeps replicating ongoing changes.
  3. When the target is in sync, switch the application over: minimal downtime.

DMS Multi-AZ deployment

AWS DMS Multi-AZ: DMS keeps a synchronous standby replica of the replication instance in another Availability Zone, which gives data redundancy, removes I/O freezes and reduces latency spikes AWS DMS Multi-AZ: DMS keeps a synchronous standby replica of the replication instance in another Availability Zone, which gives data redundancy, removes I/O freezes and reduces latency spikes

A standby replication instance in another AZ.
  • When Multi-AZ is enabled, DMS provisions and maintains a synchronous standby replica in a different AZ.
  • Advantages: data redundancy, eliminates I/O freezes, minimizes latency spikes.

RDS and Aurora migrations

RDS MySQL → Aurora MySQL:

  • Option 1: DB snapshot from RDS MySQL restored as a MySQL Aurora DB.
  • Option 2: create an Aurora read replica from the RDS MySQL instance, and when the replication lag is 0, promote it as its own DB cluster (can take time and cost $).

External MySQL → Aurora MySQL:

  • Option 1: use Percona XtraBackup to create a file backup in Amazon S3, then create an Aurora MySQL DB from Amazon S3.
  • Option 2: create an Aurora MySQL DB, then use the mysqldump utility to migrate MySQL into Aurora (slower than the S3 method).

RDS PostgreSQL → Aurora PostgreSQL: the same two options (snapshot, or Aurora read replica then promote).

External PostgreSQL → Aurora PostgreSQL: create a backup and put it in Amazon S3, then import it using the aws_s3 Aurora extension.

Use DMS if both databases are up and running (ongoing replication with minimal downtime).

Real-world examples

  • A company moves a 3 TB Oracle database to Aurora PostgreSQL: SCT converts the schema and flags stored procedures to rewrite by hand, then DMS does a full load and CDC for two weeks until cut-over on a Sunday night.

Exam tips

  • "Migrate a database with minimal downtime, source stays live" → DMS (full load + CDC).
  • "Different engines (Oracle → Aurora, SQL Server → MySQL)" → schema conversion (SCT or DMS Schema Conversion) + DMS.
  • "Same engine (PostgreSQL → RDS PostgreSQL)" → DMS (or native tools) without SCT.
  • "Teradata or Oracle data warehouse to Redshift" → SCT + DMS.
  • "RDS MySQL to Aurora" → snapshot restore, or Aurora read replica then promote.
  • "Stream database changes to Kinesis" → DMS with Kinesis Data Streams as the target.

Common traps

  • "SCT is needed for every migration." Only when the engine changes.
  • "DMS takes the source offline." It stays available during the migration.

Check yourself

A DMS replication instance and two databases cost money per hour, so instead:

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt