AWS Database Migration Service (DMS) – Production-Ready Guide

By Bishal Dhimal | Dec 2025

📌 Table of Contents 1. Planning Your Database Migration 2. Schema & Code Migration 3. Unsupported Data Types 4. DMS Migration Scenarios 5. Preparation for Production Migration 6. Database Migration Steps 7. Monitoring & Validation 8. Best Practices 9. References

1️⃣ Planning Your Database Migration

2️⃣ Schema & Code Migration

While DMS migrates data, schema and code migration is separate.

Schema Migration:

Code Migration:

Tools:

3️⃣ Unsupported Data Types & Transformations

Plan for type conversions:

💡 Use SCT to generate conversion scripts and manually adjust unsupported items.

4️⃣ AWS DMS Migration Scenarios

Source Target Notes
On-Prem MySQL Amazon RDS MySQL Full or incremental replication
Oracle Aurora PostgreSQL Heterogeneous migration; use SCT
RDS MySQL S3 / Glacier Data archiving and cost optimization

5️⃣ Preparation for Production Migration

6️⃣ Database Migration Steps

6.1 Prepare Source Database (MySQL Example)

sudo apt update
sudo apt install mysql-server -y
sudo mysql_secure_installation
sudo systemctl enable mysql
sudo systemctl start mysql

Create a migration user:

CREATE USER 'migration_user'@'%' IDENTIFIED BY 'StrongPassword123';
GRANT ALL PRIVILEGES ON *.* TO 'migration_user'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Create demo database & tables:

CREATE DATABASE library;
USE library;

CREATE TABLE authors (
  author_id INT AUTO_INCREMENT PRIMARY KEY,
  name VARCHAR(100),
  country VARCHAR(50)
);

CREATE TABLE books (
  book_id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(150),
  genre VARCHAR(50),
  author_id INT,
  FOREIGN KEY (author_id) REFERENCES authors(author_id)
);

INSERT INTO authors (name, country) VALUES
('J.K. Rowling', 'UK'),
('George Orwell', 'UK'),
('Mark Twain', 'USA');

INSERT INTO books (title, genre, author_id) VALUES
('Harry Potter and the Sorcerer''s Stone', 'Fantasy', 1),
('1984', 'Dystopian', 2),
('Animal Farm', 'Satire', 2),
('The Adventures of Tom Sawyer', 'Adventure', 3);
⚠️ For production, use strong passwords and limit user access via security groups instead of public access.

6.2 Create Target Database (RDS)

6.3 Create DMS Replication Instance

6.4 Create Source & Target Endpoints

6.5 Create Migration Task

6.6 Monitor Migration Task

7️⃣ Monitoring & Validation

8️⃣ Best Practices

9️⃣ References

← Back to Blogs