Database Engines and Migration Strategies for AWS
Database engines with appropriate use cases (for example, heterogeneous migrations, homogeneous migrations)
Database Engines and Migration Strategies for AWS
This guide covers the critical knowledge required for the SAA-C03 exam regarding the selection of database engines and the execution of data migrations using AWS services like DMS and SCT.
Learning Objectives
After studying this guide, you should be able to:
- Differentiate between homogeneous and heterogeneous database migrations.
- Identify the appropriate AWS database engine (RDS, Aurora, DynamoDB) for specific use cases.
- Explain the role of the AWS Database Migration Service (DMS) and the Schema Conversion Tool (SCT).
- Understand licensing models for commercial database engines in the cloud.
Key Terms & Glossary
- Homogeneous Migration: A migration where the source and target database engines are the same or compatible (e.g., MySQL to RDS MySQL).
- Heterogeneous Migration: A migration where the source and target database engines are different (e.g., Oracle to Amazon Aurora).
- DMS (Database Migration Service): A service that helps you migrate databases to AWS quickly and securely while the source database remains functional.
- SCT (Schema Conversion Tool): A tool used in heterogeneous migrations to convert the source schema and code to match the target database.
- OLTP (Online Transactional Processing): High-volume, fast transactions (Standard RDS/Aurora use case).
- OLAP (Online Analytical Processing): Complex queries and data analysis (Redshift use case).
The "Big Idea"
Migrating to the cloud is not a one-size-fits-all process. The "Big Idea" is to match the Migration Strategy to the Business Goal. If the goal is a quick "Lift and Shift," a homogeneous migration to RDS is best. If the goal is to reduce licensing costs and improve performance, a heterogeneous migration to a cloud-native engine like Amazon Aurora is the strategic choice.
Formula / Concept Box
| Migration Type | Source Engine | Target Engine | Tools Required |
|---|---|---|---|
| Homogeneous | MySQL | RDS MySQL | AWS DMS |
| Heterogeneous | Oracle | Amazon Aurora | AWS DMS + AWS SCT |
| NoSQL Migration | MongoDB | DynamoDB | AWS DMS |
| Large Scale (>10TB) | Any | Any | Snowball Edge + DMS |
Hierarchical Outline
- I. Amazon Relational Database Service (RDS)
- Engines: MySQL, MariaDB, PostgreSQL, Oracle, Microsoft SQL Server.
- Licensing:
- License Included: Standard for open-source; available for SQL Server/Oracle SE2.
- BYOL (Bring Your Own License): Available for Oracle (Enterprise/Standard).
- II. Amazon Aurora
- Architecture: Decoupled storage and compute; 6 copies of data across 3 AZs.
- Compatibility: Drop-in replacement for MySQL and PostgreSQL.
- Features: Serverless mode, Global Database, and Backtrack (MySQL only).
- III. AWS Database Migration Service (DMS)
- Components: Replication Instance, Source Endpoint, Target Endpoint, Replication Task.
- Capabilities: One-time migration or ongoing replication (CDC - Change Data Capture).
Visual Anchors
Migration Workflow
Database Scaling Logic
\begin{tikzpicture}[node distance=2cm] \draw[thick,->] (0,0) -- (6,0) node[anchor=north] {Read Load}; \draw[thick,->] (0,0) -- (0,4) node[anchor=east] {Complexity}; % RDS Circle \draw[blue, thick] (1,1) circle (0.5cm); \node at (1,0.3) {RDS}; % Aurora Circle \draw[orange, thick] (4,1.5) circle (0.8cm); \node at (4,0.3) {Aurora}; % Redshift \draw[red, thick] (5,3) circle (0.6cm); \node at (5,3.8) {Redshift}; \end{tikzpicture}
Definition-Example Pairs
- Aurora Backtrack: Allows you to rewind a database to a specific point in time without using backups.
- Example: A developer accidentally runs a
DELETEstatement without aWHEREclause; Backtrack restores the table in seconds.
- Example: A developer accidentally runs a
- DMS Replication Instance: The EC2-based engine that performs the actual data movement.
- Example: When migrating a 500GB SQL Server DB, you choose a
dms.t3.mediuminstance to handle the throughput.
- Example: When migrating a 500GB SQL Server DB, you choose a
- RDS Proxy: A highly available database proxy that pools and shares established database connections.
- Example: A Lambda-heavy application that frequently opens/closes connections uses RDS Proxy to prevent exhausting DB connection limits.
Worked Examples
Example 1: Homogeneous Migration
Scenario: A company runs an on-premises PostgreSQL 13 database. They want to move it to AWS with minimal downtime.
- Selection: Choose RDS PostgreSQL (Homogeneous).
- Setup: Create a target RDS instance.
- Execution: Use AWS DMS. Set up a replication task with "Full Load + CDC" (Change Data Capture).
- Cutover: Point application to the RDS endpoint once the lag is near zero.
Example 2: Heterogeneous Migration
Scenario: A company wants to move from an expensive Oracle Enterprise Edition on-premises to Amazon Aurora PostgreSQL to save on licensing.
- Selection: Choose Amazon Aurora PostgreSQL (Heterogeneous).
- Schema: Use the AWS Schema Conversion Tool (SCT) to convert Oracle PL/SQL code to PostgreSQL PL/pgSQL.
- Data: Use AWS DMS to migrate the data from the source Oracle DB to the target Aurora DB.
- Verification: Validate data integrity and update application code for the new syntax.
Checkpoint Questions
- Which tool is required for a heterogeneous migration but NOT for a homogeneous one?
- Answer: AWS Schema Conversion Tool (SCT).
- You need to migrate a 20 TB database to AWS, but your internet connection is slow. What should you use?
- Answer: Snowball Edge to move the bulk data, then DMS for incremental changes.
- Does Amazon Aurora support a "Bring Your Own License" (BYOL) model?
- Answer: No, Aurora is a cloud-native engine; licensing is built into the service cost (License Included).
- Which RDS engine is marketed as the "most Oracle-compatible" open-source option?
- Answer: PostgreSQL.