Xoxoftware - XOXO Creative Studio | Web & Mobile App Development | Fred Cheung | Hong Kong
AWSMigration

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

ConceptDescription
Replication InstanceAn EC2 instance that runs the migration tasks; sized based on workload
Source EndpointConnection to the source database (on-premises, EC2, RDS, or other cloud)
Target EndpointConnection to the target database (RDS, Aurora, DynamoDB, S3, Redshift, etc.)
Migration TaskDefines what data to migrate, the migration type, and table mappings
Full LoadOne-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 MappingRules 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 AssessmentAutomated 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) ────▶│────────────────────────────────▶│
       │                              │                                 │
  1. Full Load — Bulk-copies all existing rows from source tables to the target
  2. CDC — Reads the source database transaction log and continuously applies changes
  3. Full Load + CDC — Most common; combines both for a complete migration with minimal downtime

Migration Types

TypeDescriptionDowntime
Full Load onlyOne-time copy of all data; no ongoing replicationHigher (cutover gap)
CDC onlyReplicate only ongoing changes (assumes target already loaded)Minimal
Full Load + CDCBulk copy then continuous replication until cutoverMinimal (recommended)

Homogeneous vs Heterogeneous Migration

AspectHomogeneousHeterogeneous
ExampleMySQL → Aurora MySQLOracle → Aurora PostgreSQL
Schema conversionNot needed (same engine)Required — use AWS SCT
DMS roleData replication onlyData replication (after SCT schema convert)
ComplexityLowerHigher — stored procedures, triggers, types

Supported Sources and Targets

DirectionSupported Engines
SourcesOracle, SQL Server, MySQL, MariaDB, PostgreSQL, MongoDB, SAP ASE, IBM Db2, Azure SQL, S3
TargetsRDS (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

ProviderService / SolutionNotes
AWSAWS DMSBaseline
AzureAzure Database Migration ServiceSimilar concept; supports offline + online modes
GCPDatabase Migration ServiceFocused on MySQL and PostgreSQL to Cloud SQL
On-PremisesOracle GoldenGate, Attunity Replicate, StriimEnterprise CDC and replication tools

Pricing Model

DimensionUnitNotes
Replication instancePer hourBased on instance class (e.g., dms.r5.large)
Data transferPer GB outStandard AWS data transfer rates apply
Log storagePer GB-monthTask logs stored on the replication instance

Built by Fred Cheung @CookedRicer · Powered by Fumadocs & Github Copilot

On this page