AWS Database Services: RDS, Aurora, and DynamoDB Study Guide
Database types and services (for example, relational compared with non-relational, Amazon Aurora, Amazon DynamoDB)
AWS Database Services: RDS, Aurora, and DynamoDB
This guide covers the core database offerings on AWS, focusing on the architectural differences between relational (RDS/Aurora) and non-relational (DynamoDB) systems as required for the SAA-C03 exam.
Learning Objectives
After studying this guide, you should be able to:
- Distinguish between relational (SQL) and non-relational (NoSQL) database use cases.
- Identify the six database engines supported by Amazon RDS.
- Explain the high-availability and scaling mechanisms of Amazon Aurora.
- Calculate throughput requirements for DynamoDB using Read Capacity Units (RCUs) and Write Capacity Units (WCUs).
- Contrast Multi-AZ deployments with Read Replicas for performance and disaster recovery.
Key Terms & Glossary
| Term | Definition | Example |
|---|---|---|
| ACID | Atomicity, Consistency, Isolation, Durability; properties that guarantee reliable database transactions. | A bank transfer where money must leave one account and enter another simultaneously. |
| Multi-AZ | A high-availability feature that creates a synchronous standby instance in a different Availability Zone. | Failing over to a standby RDS instance during a data center power outage. |
| Read Replica | An asynchronous copy of the primary database used to offload read traffic. | Routing a "View Order History" web request to a replica to save CPU on the primary DB. |
| Partition Key | A simple primary key in DynamoDB used to distribute data across physical storage. | A User_ID used to find a specific user's profile. |
| Horizontal Scaling | Scaling by adding more instances or nodes to a system. | Adding more DynamoDB partitions to handle increased traffic. |
The "Big Idea"
The central challenge in cloud architecture is matching the data access pattern to the database engine. If your data is highly structured and requires complex joins, Amazon RDS or Aurora (Relational) provides a familiar, managed environment. If your application requires massive, predictable scale with simple queries (key-value), Amazon DynamoDB (Non-relational) offers a serverless solution that can handle millions of requests per second with single-digit millisecond latency.
Formula / Concept Box
DynamoDB Capacity Calculations
Use these formulas to determine the required units for Provisioned Capacity mode:
| Unit Type | Condition | Formula |
|---|---|---|
| Write Capacity Unit (WCU) | 1 unit per 1 KB / second | |
| Strongly Consistent RCU | 1 unit per 4 KB / second | |
| Eventually Consistent RCU | 2 units per 4 KB / second |
[!IMPORTANT] Always round item sizes up to the nearest 1 KB (for writes) or 4 KB (for reads) before performing calculations.
Hierarchical Outline
- Amazon Relational Database Service (RDS)
- Managed Service: AWS handles patching, backups, and hardware.
- Supported Engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, and Amazon Aurora.
- High Availability: Multi-AZ (Synchronous replication to a standby).
- Scalability: Read Replicas (Asynchronous replication for read-heavy workloads).
- Amazon Aurora
- Cloud-Native: Built for the cloud; up to 5x faster than standard MySQL.
- Storage: Automatically grows in 10 GB increments up to 128 TiB.
- Replication: 6 copies of data across 3 Availability Zones.
- Amazon DynamoDB
- NoSQL: Key-value and document store.
- Serverless: No servers to manage; automatic scaling.
- Consistency: Choice between Eventually Consistent (default) and Strongly Consistent reads.
Visual Anchors
Database Selection Decision Tree
Multi-AZ vs. Read Replica Architecture
\begin{tikzpicture}[node distance=2cm, every node/.style={rectangle, draw, minimum width=2.5cm, minimum height=1cm, align=center}]
% AZ labels \node[draw=none] (AZ1) at (0, 3) {\textbf{Availability Zone A}}; \node[draw=none] (AZ2) at (6, 3) {\textbf{Availability Zone B}};
% Database Nodes \node (Primary) at (0, 1.5) {Primary DB$Read/Write)}; \node (Standby) at (6, 1.5) {Standby DB$Multi-AZ Passive)}; \node (Replica) at (6, -0.5) {Read Replica$Async Read Only)};
% Connections \draw[<->, thick] (Primary) -- node[above, midway, font=\small] {Synchronous} (Standby); \draw[->, dashed, thick] (Primary) -- node[left, midway, font=\small] {Asynchronous} (Replica);
% Boundary Boxes \draw[dashed, gray] (-1.5, -1.5) rectangle (1.5, 2.5); \draw[dashed, gray] (4.5, -1.5) rectangle (7.5, 2.5);
\end{tikzpicture}
Definition-Example Pairs
- Database Engine: The specific software running on a database server.
- Example: Choosing PostgreSQL for RDS because your application uses specific PostGIS extensions for geographic data.
- On-Demand Capacity (DynamoDB): A flexible billing model where you pay per request rather than provisioning throughput.
- Example: A new startup app with unpredictable traffic spikes uses On-Demand to avoid "ProvisionedThroughputExceeded" errors.
- Global Tables: A DynamoDB feature that provides multi-region, multi-active replication.
- Example: A global gaming leaderboard where players in London and Tokyo need sub-millisecond local read/write access to the same data.
Worked Examples
Scenario 1: DynamoDB RCU Calculation
Question: An application needs to read 10 items per second. Each item is 6 KB in size. The application requires Strongly Consistent reads. How many RCUs are needed?
Step-by-Step Solution:
- Determine Item Size Factor: Each RCU covers 4 KB. A 6 KB item must be rounded up to the nearest 4 KB increment, which is 8 KB.
- Calculate Units per Item: $8 KB / 4 KB = 2 RCUs per item$.
- Multiply by Frequency: $2 \text{ RCUs/item} \times 10 \text{ items/sec} = 20 \text{ RCUs}$.
Scenario 2: Selecting the Service
Question: A company is migrating a legacy .NET application that uses a Microsoft SQL Server database. They want to minimize management overhead but keep the existing schema. Which service should they choose?
Solution: Amazon RDS for SQL Server. It is a managed service that supports the existing SQL Server engine, allowing for a "lift-and-shift" migration with minimal code changes.
Checkpoint Questions
- Which RDS feature provides high availability by failing over to a standby instance in a different AZ?
- True or False: You can use Read Replicas to improve the performance of write-heavy applications.
- What is the maximum storage size for an Amazon Aurora database cluster?
- How many Write Capacity Units (WCUs) are needed to write five 3.5 KB items per second?
▶Click to reveal answers
- Multi-AZ Deployment
- False (Read Replicas only scale read traffic; they actually add a small overhead to the primary for replication traffic).
- 128 TiB
- 20 WCUs (Each 3.5 KB item rounds up to 4 KB. $4 KB = 4 WCUs).