Task Statement 4.3: Design cost-optimized database solutions.
📘AWS Certified Solutions Architect – (SAA-C03)
1. What This Topic Means (Simple Definition)
Database migration means:
- Moving data + schema (structure of database tables, indexes, constraints)
- From one place to another OR
- From one database engine to another
In AWS, this usually means moving databases:
A. Between locations
- On-premises → AWS Cloud
- AWS Region → another AWS Region
- One Availability Zone → another (less common for full migration)
B. Between database engines
- Oracle → Amazon Aurora PostgreSQL/MySQL
- MySQL → PostgreSQL
- SQL Server → Amazon RDS/Aurora
- MongoDB → DynamoDB (sometimes redesign required)
2. What is Included in a Database Migration?
A full migration includes:
2.1 Schema Migration
This is the structure:
- Tables
- Columns
- Data types
- Indexes
- Primary keys / foreign keys
- Constraints
2.2 Data Migration
This is the actual data inside:
- Rows in tables
- Large objects (BLOBs, JSON, logs, etc.)
2.3 Code Migration (sometimes)
- Stored procedures
- Triggers
- Functions
- Views
3. Key AWS Services for Database Migration (VERY IMPORTANT FOR EXAM)
3.1 AWS Database Migration Service (AWS DMS)
What it does:
AWS DMS is the main service for database migration.
It supports:
- Homogeneous migration
(same engine → same engine)
Example: MySQL → MySQL - Heterogeneous migration
(different engine → different engine)
Example: Oracle → PostgreSQL
Key Features of AWS DMS:
1. Minimal downtime migration
- Source database stays online during migration
2. Continuous Data Replication (CDC)
- Captures ongoing changes while migration is happening
3. Schema conversion support (with AWS SCT)
- DMS does NOT fully convert schema itself
- You need AWS SCT for engine conversion
3.2 AWS Schema Conversion Tool (AWS SCT)
What it does:
AWS SCT converts:
- Schema structure
- SQL code (stored procedures, views, functions)
Used when:
- Migrating between different database engines
Example:
- Oracle → Amazon Aurora PostgreSQL
Important Exam Point:
- AWS SCT = schema conversion
- AWS DMS = data movement
3.3 Amazon RDS / Amazon Aurora Migration Tools
Used for:
- Managed relational database migrations
- Read replicas for migration support
Example:
- Promote read replica after migration testing
3.4 AWS Snowball / Snowmobile (Offline migration)
Used when:
- Data is extremely large (TB/PB scale)
- Network transfer is too slow
Process:
- Copy data to Snowball device
- Ship it to AWS
- AWS uploads data into S3 or database
3.5 Amazon S3 as Staging Layer
Often used for:
- Temporary storage of exported data
- CSV, JSON, Parquet files
Then loaded into:
- RDS
- Redshift
- Aurora
4. Types of Database Migration (Exam Important)
4.1 Homogeneous Migration
Same database engine:
- MySQL → MySQL (on EC2 or RDS)
- PostgreSQL → PostgreSQL
Tools:
- AWS DMS
- Native backup/restore
Key idea:
No schema conversion needed
4.2 Heterogeneous Migration
Different database engines:
- Oracle → PostgreSQL
- SQL Server → MySQL
- MongoDB → DynamoDB (requires redesign)
Tools:
- AWS SCT + AWS DMS
Key idea:
Requires schema + data conversion
4.3 Lift-and-Shift Migration
- Move database without redesign
- Same structure, same engine
Example:
- On-prem MySQL → Amazon RDS MySQL
4.4 Re-architected Migration
- Change database engine or design
- Optimize for cloud-native services
Example:
- Oracle → Aurora Serverless
- SQL Server → DynamoDB (NoSQL redesign)
5. Migration Strategies (VERY IMPORTANT)
5.1 Big Bang Migration
- All data moved at once
- Short downtime required
Use when:
- Small database
- Downtime is acceptable
5.2 Phased Migration (Recommended)
- Data moved in stages
- Uses AWS DMS + CDC
Advantages:
- Minimal downtime
- Safer for production systems
5.3 Parallel Run
- Old and new database run together
- Applications tested on new database before switch
6. Schema Migration Challenges (Exam Focus Areas)
6.1 Data Type Differences
Example:
- Oracle DATE vs PostgreSQL TIMESTAMP
6.2 SQL Syntax Differences
- Stored procedures may not work directly
6.3 Index Differences
- Some engines support different index types
6.4 Constraint Differences
- Foreign keys may behave differently
7. AWS DMS Migration Process (Step-by-Step)
Step 1: Create Source Endpoint
- On-prem database or RDS
Step 2: Create Target Endpoint
- Amazon RDS / Aurora / Redshift / S3
Step 3: Create Replication Instance
- This runs migration tasks
Step 4: Define Migration Task
- Full load OR
- Full load + CDC
Step 5: Start Migration
- Data starts moving
8. Migration Modes in AWS DMS
8.1 Full Load
- Copy all existing data once
8.2 Full Load + CDC (Most Common Exam Answer)
- Copy existing data
- Then keep syncing changes
8.3 CDC Only
- Only capture changes (rare use case)
9. Common AWS Migration Architectures (Exam Scenarios)
Scenario 1: On-prem MySQL → Amazon Aurora MySQL
- Use AWS DMS (no schema conversion needed)
- Optional: Read replica for testing
Scenario 2: Oracle → Aurora PostgreSQL
- Use AWS SCT (schema conversion)
- Use AWS DMS (data migration)
Scenario 3: Large dataset (multi-TB)
- Use AWS Snowball → S3 → RDS/Aurora
Scenario 4: Zero-downtime migration
- Use AWS DMS with CDC
- Switch application after sync
10. Key Exam Keywords (MEMORIZE THESE)
- AWS DMS = Data migration
- AWS SCT = Schema conversion
- CDC = Continuous Data Replication
- Homogeneous = same engine
- Heterogeneous = different engine
- Full load = initial copy
- Phased migration = minimal downtime
- Snowball = offline large data transfer
11. Common Exam Traps
Trap 1:
❌ “DMS converts schema”
✔ Correct: AWS SCT converts schema
Trap 2:
❌ “Use RDS snapshot for cross-engine migration”
✔ Correct: Snapshots only work for same engine
Trap 3:
❌ “Use manual export/import for large migrations”
✔ Better: Use DMS or Snowball
12. Final Summary (Quick Revision)
To migrate databases in AWS:
- Use AWS DMS for data migration
- Use AWS SCT for schema conversion
- Use CDC for minimal downtime
- Use Snowball for very large datasets
- Choose migration type:
- Homogeneous = simple
- Heterogeneous = needs conversion
- Prefer phased migration for production systems
