AWS DMS
Database migration — migrate databases to AWS with minimal downtime using continuous data replication and optional schema conversion.
Overview
AWS Database Migration Service (DMS) migrates databases to AWS quickly and securely — the source database remains operational during migration, minimising downtime for applications. DMS supports homogeneous (e.g., Oracle to Oracle) and heterogeneous (e.g., Oracle to Aurora PostgreSQL) migrations.
Core Concepts
| Concept | Description |
|---|---|
| Replication Instance | An EC2 instance that runs the migration tasks; sized based on workload |
| Source Endpoint | Connection to the source database (on-premises, EC2, RDS, or other cloud) |
| Target Endpoint | Connection to the target database (RDS, Aurora, DynamoDB, S3, Redshift, etc.) |
| Migration Task | Defines what data to migrate, the migration type, and table mappings |
| Full Load | One-time bulk copy of all existing data from source to target |
| Change Data Capture (CDC) | Continuous replication of ongoing changes after the full load |
| Table Mapping | Rules that select, filter, rename, or transform tables and columns during migration |
| Schema Conversion Tool (SCT) | Standalone tool that converts source database schema and code to target-compatible format |
| Premigration Assessment | Automated checks that identify potential issues before starting migration |
How DMS Works
Source Database Replication Instance Target Database
(on-prem / EC2 / RDS) (runs in a VPC) (RDS / Aurora / S3 / etc.)
│ │ │
│── Full Load ────────────────▶│────────────────────────────────▶│
│ │ │
│── CDC (ongoing changes) ────▶│────────────────────────────────▶│
│ │ │- Full Load — Bulk-copies all existing rows from source tables to the target
- CDC — Reads the source database transaction log and continuously applies changes
- Full Load + CDC — Most common; combines both for a complete migration with minimal downtime
Migration Types
| Type | Description | Downtime |
|---|---|---|
| Full Load only | One-time copy of all data; no ongoing replication | Higher (cutover gap) |
| CDC only | Replicate only ongoing changes (assumes target already loaded) | Minimal |
| Full Load + CDC | Bulk copy then continuous replication until cutover | Minimal (recommended) |
Homogeneous vs Heterogeneous Migration
| Aspect | Homogeneous | Heterogeneous |
|---|---|---|
| Example | MySQL → Aurora MySQL | Oracle → Aurora PostgreSQL |
| Schema conversion | Not needed (same engine) | Required — use AWS SCT |
| DMS role | Data replication only | Data replication (after SCT schema convert) |
| Complexity | Lower | Higher — stored procedures, triggers, types |
Supported Sources and Targets
| Direction | Supported Engines |
|---|---|
| Sources | Oracle, SQL Server, MySQL, MariaDB, PostgreSQL, MongoDB, SAP ASE, IBM Db2, Azure SQL, S3 |
| Targets | RDS (all engines), Aurora, Redshift, DynamoDB, S3, OpenSearch, Kinesis Data Streams, Kafka, DocumentDB, Neptune |
AWS Schema Conversion Tool (SCT)
- Converts source schema objects (tables, views, stored procedures, functions) to target-compatible format
- Provides an assessment report showing conversion complexity and manual intervention items
- Handles data type mapping, code translation, and object dependency resolution
- Required for heterogeneous migrations; not needed for homogeneous
Common Use Cases
- Cloud migration — Migrate on-premises databases to RDS or Aurora with minimal downtime using Full Load + CDC.
- Database engine change — Move from commercial (Oracle, SQL Server) to open-source (PostgreSQL, MySQL) to reduce licensing costs.
- Continuous replication — Keep an on-premises database and AWS target in sync during a migration window using CDC.
- Data lake ingestion — Replicate database changes to S3 or Kinesis for analytics and data lake architectures.
- Database consolidation — Merge multiple source databases into a single Aurora target.
SAA/SAP Exam Tips
SAA Tip: "Migrate database to AWS with minimal downtime" → DMS with Full Load + CDC. This is the standard answer for database migration questions.
Exam Trap: DMS handles data migration. For schema conversion in heterogeneous migrations (e.g., Oracle → PostgreSQL), the AWS Schema Conversion Tool (SCT) is required in addition to DMS.
SAP Tip: DMS can replicate to S3, Kinesis, or Kafka as targets — enabling real-time data lake ingestion from relational databases without building custom CDC pipelines.
Cross-Cloud Equivalents
| Provider | Service / Solution | Notes |
|---|---|---|
| AWS | AWS DMS | Baseline |
| Azure | Azure Database Migration Service | Similar concept; supports offline + online modes |
| GCP | Database Migration Service | Focused on MySQL and PostgreSQL to Cloud SQL |
| On-Premises | Oracle GoldenGate, Attunity Replicate, Striim | Enterprise CDC and replication tools |
Pricing Model
| Dimension | Unit | Notes |
|---|---|---|
| Replication instance | Per hour | Based on instance class (e.g., dms.r5.large) |
| Data transfer | Per GB out | Standard AWS data transfer rates apply |
| Log storage | Per GB-month | Task logs stored on the replication instance |
Related Services / See Also
- Amazon RDS — common migration target for relational databases
- AWS DataSync and Snow Family — for file/storage migrations (not database-specific)
- Amazon Kinesis and Flink — DMS can stream CDC to Kinesis for real-time analytics
- Amazon S3 — DMS can replicate to S3 for data lake architectures
AWS DataSync and Snow Family
Data transfer — DataSync for online file/object transfers and Snow Family for offline, petabyte-scale physical data migration.
AWS Distro for OpenTelemetry
AWS-supported distribution of OpenTelemetry — instrument once, send correlated traces, metrics, and logs to multiple observability backends.