Module 03

Database & Data Migration

Migrate databases with zero downtime using AWS DMS, and move large-scale data with DataSync, Transfer Family, and Storage Gateway.

🗄️ AWS DMS 🔄 SCT 📦 DataSync 🌐 Transfer Family

AWS Database Migration Service

AWS DMS enables you to migrate databases to AWS with minimal downtime. The source database remains fully operational during migration, making it ideal for production environments where availability is critical.

DMS Architecture

Source DB On-prem / EC2 / RDS DMS Replication Instance Source Endpoint Replication Task Target Endpoint Target DB RDS / Aurora / EC2

Key Components

Zero-Downtime Migration Process

01
Start Instance
Create DMS replication instance
02
Connect
Configure source & target endpoints
03
Select Scope
Choose tables, schemas, or databases
04
Replicate
Full load + ongoing CDC sync
05
Cutover
Switch applications to target

Schema Conversion Tool (SCT)

For heterogeneous migrations (different database engines), AWS SCT converts source schemas to the target format. It handles table definitions, stored procedures, and application SQL code. SCT is now built into DMS for many common database type combinations.

DMS Fleet Advisor

A fully-managed capability that automates migration planning by discovering and analyzing your on-premises database fleet. It assesses servers and recommends migration paths before you begin the actual migration work.

🏦 Banking Context

For AnyCompany Bank, zero-downtime migration is non-negotiable for transaction processing databases. DMS with CDC ensures that payment records, account balances, and transaction histories remain synchronized between source and target until the final cutover — typically scheduled during low-traffic windows.

Database Migration Patterns

The migration pattern you choose depends on your target architecture goals, acceptable complexity, and whether you're changing database engines.

Three Migration Patterns

Lift and Shift (to EC2)

Move the database as-is onto an EC2 instance. The database engine stays the same, you manage it yourself, but it runs on AWS infrastructure. Minimal changes required.

Replatform — Homogeneous

Same database engine, different platform. For example, moving an on-premises Oracle database to Amazon RDS for Oracle. You gain managed service benefits (automated backups, patching, HA) without changing the engine.

Replatform — Heterogeneous

Different database engine entirely. For example, migrating from Oracle or SQL Server to Amazon Aurora or PostgreSQL on RDS. Requires schema conversion (via SCT) but can deliver significant licensing cost savings.

Amazon RDS Overview

Amazon RDS is a managed relational database service supporting MySQL, Oracle, SQL Server, MariaDB, PostgreSQL, Db2, and Aurora. It handles routine administration tasks — hardware provisioning, patching, backups, and failover — so teams can focus on application logic rather than database operations.

🏦 Banking Context

AnyCompany Bank's heterogeneous migration from Oracle to Aurora PostgreSQL can eliminate millions in annual licensing costs. However, the schema conversion requires careful testing of stored procedures that implement business logic for interest calculations, fee processing, and regulatory reporting.

Data Migration Services

Beyond databases, organizations need to move files, archives, and unstructured data. AWS provides three primary services for different data movement patterns.

AWS DataSync

What It Does

An online transfer service that simplifies and accelerates moving data between on-premises storage systems and AWS. It supports NFS, SMB, self-managed object storage, HDFS, and can transfer to S3, EFS, or FSx.

Key Features

  • Schedule one-time or recurring transfers
  • Built-in data verification
  • Configurable bandwidth limits
  • CloudWatch integration for monitoring
  • Incremental sync — only transfers changed data after initial copy

AWS Transfer Family

What It Does

Provides managed file transfer using standard protocols (SFTP, FTPS, FTP, AS2) directly into S3 or EFS. Integrates with existing identity providers and eliminates the need to manage FTP server infrastructure.

Key Features

  • Supports SFTP, FTPS, FTP, and AS2 protocols
  • Custom identity provider integration via API Gateway + Lambda
  • Encrypted channels for data in transit
  • Direct integration with S3 and EFS

AWS Storage Gateway

What It Does

Provides hybrid cloud storage with local caching, bridging on-premises applications with cloud storage backends. Three gateway types serve different workload patterns:

Gateway TypeProtocolBackend StorageUse Case
File GatewayNFS / SMBAmazon S3File-based applications needing cloud-backed storage with local cache
Volume GatewayiSCSIS3 + EBS SnapshotsBlock storage with cloud backup and disaster recovery
Tape GatewayiSCSI VTLS3 + S3 GlacierReplace physical tape infrastructure with cloud-backed virtual tapes
🏦 Banking Context

AnyCompany Bank uses Transfer Family for SWIFT file processing — payment instructions arrive via SFTP and need to land directly in S3 for downstream processing. Storage Gateway's Tape Gateway replaces aging tape libraries used for regulatory archive retention (7+ year requirements for transaction records).

Bandwidth Planning

The feasibility of online data migration depends on two factors: how much data you need to move, and how much network bandwidth is available. This calculator helps determine whether online transfer is practical for your timeline.

Transfer Time Calculator

Data Volume100 Mbps1 Gbps10 Gbps
1 TB~30 hours~3 hours~18 minutes
10 TB~12 days~30 hours~3 hours
100 TB~124 days~12 days~30 hours
1 PB~3 years~124 days~12 days
10 PB~34 years~3 years~124 days
Note

These estimates assume approximately 25% network overhead. The formula: Days = Total Bytes ÷ (Mbps × 125,000 × 86,400). For large-scale transfers exceeding available bandwidth windows, consider AWS Direct Connect for dedicated network capacity.

Choosing the Right Service

ServiceBest ForTransfer Method
DataSyncBulk online transfers from NFS/SMB/HDFS to S3/EFS/FSxOnline (agent-based)
Transfer FamilyProtocol-based file transfers (SFTP/FTPS/FTP) into S3/EFSOnline (managed server)
Storage GatewayHybrid storage with local caching for ongoing accessOnline (appliance-based)

Data Migration Challenges

🏦 Banking Context

AnyCompany Bank's data migration must account for regulatory requirements around data residency. Transaction archives may need to remain in specific geographic regions, and transfer windows must avoid peak trading hours when network bandwidth is reserved for real-time payment processing.