AWS Database Engines and Migration Strategies
Database engines with appropriate use cases (for example, heterogeneous migrations, homogeneous migrations)
AWS Database Engines and Migration Strategies
This guide covers the critical knowledge required to select the appropriate AWS database engine and execute successful migrations, focusing on the distinction between homogeneous and heterogeneous patterns as defined in the SAA-C03 curriculum.
Learning Objectives
After studying this guide, you should be able to:
- Differentiate between relational (RDS) and non-relational (DynamoDB) use cases.
- Select the appropriate RDS engine (MySQL, PostgreSQL, MariaDB, Oracle, SQL Server) based on application requirements.
- Explain the performance benefits and compatibility of Amazon Aurora.
- Compare homogeneous and heterogeneous database migrations.
- Identify the role of AWS DMS and Snowball Edge in data movement.
Key Terms & Glossary
- Homogeneous Migration: A migration where the source and target database engines are the same or compatible (e.g., Oracle to Oracle, or MySQL to Aurora MySQL).
- Heterogeneous Migration: A migration where the source and target engines are different (e.g., Oracle to Amazon Aurora or Microsoft SQL Server to MySQL).
- AWS DMS (Database Migration Service): A managed service that helps migrate databases to AWS quickly and securely while the source database remains operational.
- BYOL (Bring Your Own License): A licensing model where you use your existing software licenses on AWS resources (commonly used with Oracle).
- Aurora Backtrack: A feature for Aurora MySQL that allows you to "rewind" the database to a specific point in time without restoring from a backup.
The "Big Idea"
Databases are the foundation of modern applications, but they are often the hardest components to move. AWS provides a spectrum of engines—from open-source favorites like MySQL to high-performance proprietary-compatibles like Aurora. The "Big Idea" is that migration isn't just about moving data; it’s about choosing the right tool (DMS) and strategy (Homogeneous vs. Heterogeneous) to minimize downtime and potentially modernize the stack from expensive legacy providers to cost-effective cloud-native solutions.
Formula / Concept Box
| Concept | Description | Use Case |
|---|---|---|
| License Included | License cost is bundled into the hourly rate. | MySQL, MariaDB, PostgreSQL, SQL Server, Oracle SE2. |
| BYOL | You provide the license; AWS provides the infrastructure. | Oracle (Enterprise/Standard Editions). |
| Homogeneous | Simple "Lift and Shift" to RDS. | |
| Heterogeneous | Modernization (e.g., leaving Oracle for Aurora). | |
| Snowball Edge | Physical data transport. | Migrations where data size > network bandwidth. |
Hierarchical Outline
- AWS Relational Database Service (RDS)
- Open Source Engines: MySQL, MariaDB, PostgreSQL (high Oracle compatibility).
- Commercial Engines: Microsoft SQL Server, Oracle (Standard and Enterprise).
- Amazon Aurora
- Architecture: Virtualized storage layer; 3 Availability Zones (AZs) by default.
- Compatibility: MySQL-compatible and PostgreSQL-compatible editions.
- Aurora Serverless: On-demand auto-scaling for unpredictable workloads.
- Migration Mechanics
- AWS DMS: Provisions a Replication Instance to sync data.
- Schema Conversion: Necessary for heterogeneous migrations to translate stored procedures and views.
- Snowball Edge: Used as a physical "shuttle" for massive datasets that would take weeks to upload over VPC/VPN.
Visual Anchors
Migration Decision Logic
DMS Architecture
\begin{tikzpicture}[node distance=2cm, every node/.style={rectangle, draw, rounded corners, minimum width=3cm, minimum height=1cm, align=center}]
\node (source) [fill=blue!10] {Source DB\$On-Premises)};
\node (dms) [right=of source, fill=orange!20] {AWS DMS\$Replication Instance)};
\node (target) [right=of dms, fill=green!10] {Target DB\$Amazon RDS/Aurora)};
\draw[->, thick] (source) -- (dms) node[midway, above] {\Capture};
\draw[->, thick] (dms) -- (target) node[midway, above] {\Apply};
\draw[dashed] ([yshift=1.5cm]dms.west) -- ([yshift=1.5cm]target.east) node[midway, above] {\AWS Cloud Boundary};\end{tikzpicture}
Definition-Example Pairs
PostgreSQL
- Definition: An advanced open-source relational database known for its extensibility and high compatibility with Oracle features.
- Example: Moving an in-house application built for Oracle to PostgreSQL on RDS to eliminate high licensing costs while maintaining complex query logic.
Aurora Backtrack
- Definition: A feature that allows you to return a database to a previous state within a 72-hour window without needing to perform a full point-in-time restore (PITR).
- Example: A developer accidentally runs a
DELETEcommand without aWHEREclause on the production database. Instead of a 4-hour restore, they "Backtrack" the instance 5 minutes in just a few seconds.
Worked Examples
Scenario: Migrating a Legacy Oracle Database
Requirement: A company wants to migrate an on-premises Oracle Enterprise Edition database to AWS. They want to reduce licensing costs and improve performance.
Step-by-Step Solution:
- Assessment: Evaluate if the migration is Homogeneous (Oracle to RDS Oracle) or Heterogeneous (Oracle to Aurora PostgreSQL). To save costs, they choose Heterogeneous.
- Schema Conversion: Use a schema conversion tool to translate Oracle-specific PL/SQL into PostgreSQL-compatible syntax.
- Connectivity: Establish an AWS Direct Connect or VPN to handle the data transfer.
- Data Movement: Provision an AWS DMS Replication Instance.
- Synchronization: Perform an initial full load, followed by Change Data Capture (CDC) to keep the target in sync with the source.
- Cutover: Once the lag is near zero, point the application to the new Aurora endpoint.
Checkpoint Questions
- Which AWS database engine is considered a "drop-in" replacement for MySQL and PostgreSQL with better performance?
- What is the main difference between a homogeneous and a heterogeneous migration?
- If you have an Oracle license and want to use it on AWS to save on "License Included" costs, which model should you use?
- When should you use AWS Snowball Edge in conjunction with DMS?
- True or False: AWS DMS can migrate data between relational and non-relational databases (e.g., MongoDB to DocumentDB).
[!TIP] Answers: 1. Amazon Aurora. 2. Homogeneous uses the same engine; Heterogeneous changes the engine. 3. Bring Your Own License (BYOL). 4. When the dataset is too large to transfer over the network. 5. True.