AWS Database —
The Right DB for Every Problem
Not a list of services — a decision framework. AWS has 12+ database services. Understanding when to choose each — relational, NoSQL, in-memory, graph, analytics, time-series — is the real skill for both production and AWS certification exams.
Every application has a data model — tables, documents, key-value pairs, graphs, time-series. AWS provides a purpose-built database for each model. The secret: never force a relational database to do a graph job, and never run analytics on an OLTP database.
| Category | Service | Data Model | One-Liner |
|---|---|---|---|
| ① Relational (OLTP) | RDS | Tables, SQL, ACID | Standard structured-data workloads |
| ① Relational (Cloud) | Aurora | Tables, SQL, ACID | RDS ×5 perf, multi-AZ native, serverless |
| ② NoSQL / Key-Value | DynamoDB | Key-value & document | Serverless, ms latency, any scale |
| ③ In-Memory (Cache) | ElastiCache | Key-value (RAM) | Sub-ms reads, reduce DB load |
| ③ In-Memory (Durable) | MemoryDB for Redis | Key-value (RAM + log) | Redis speed + full durability |
| ④ Graph | Neptune | Nodes + edges | Relationships, social, fraud detection |
| ⑤ Analytics (OLAP) | Redshift | Columnar SQL | Data warehouse, petabyte analytics |
| ⑥ Time-Series | Timestream | Timestamped rows | IoT sensors, metrics, logs |
| ⑦ Ledger | QLDB | Immutable journal | Cryptographic audit trail |
| ⑧ Document | DocumentDB | JSON documents | MongoDB-compatible, flexible schema |
| ⑨ Wide-Column | Keyspaces | Partition + column | Cassandra-compatible, high-write |
These services are not alternatives — they solve different problems. A production system typically uses multiple: RDS/Aurora (OLTP) + ElastiCache (caching) + DynamoDB (session/NoSQL) + Redshift (analytics).
| You Need… | Use | Why |
|---|---|---|
| SQL, ACID, complex joins, structured data | RDS / Aurora | Row-based OLTP, familiar SQL interface |
| MySQL/Postgres with higher perf + native HA | Aurora | 5× MySQL / 3× PG speed, 6 copies across 3 AZs, auto-scaling storage |
| Serverless NoSQL, ms latency, unpredictable scale | DynamoDB | Single-digit ms, unlimited scale, access-pattern design |
| Sub-ms reads, reduce DB load, session storage | ElastiCache | Redis or Memcached in-memory; cache reads, not a primary DB |
| Redis as a durable primary database | MemoryDB for Redis | Redis speed + Multi-AZ transaction log, zero data loss on failover |
| Social network, fraud detection, recommendation | Neptune | Graph traversal is O(n); SQL JOINs are O(nยณ) for multi-hop |
| Analytics, BI dashboards, petabyte queries | Redshift | Columnar, MPP, Spectrum for S3, Zero-ETL from RDS |
| IoT sensor data, metrics, time-stamped events | Timestream | Purpose-built, hot→warm→cold auto-tiering, 10× cheaper |
| Immutable audit trail, financial ledger | QLDB | Cryptographic hash chain; nothing can be deleted or altered |
| JSON documents, MongoDB-compatible API | DocumentDB | Wire-protocol compatible; Aurora-style storage underneath |
| Cassandra workloads on AWS | Keyspaces | Drop-in Cassandra replacement, serverless, on-demand pricing |
| Oracle/SQL Server + need OS-level access | RDS Custom | RDS automation + SSH to EC2, install agents, custom patches |
🎯 Exam Keywords → Service
- “SQL, ACID, relational, transactions” → RDS / Aurora
- “higher performance MySQL/PG, multi-AZ native” → Aurora
- “global database, cross-region reads with <1s lag” → Aurora Global Database
- “serverless NoSQL, single-digit ms, any scale” → DynamoDB
- “DynamoDB stream, process changes in real-time” → DynamoDB Streams + Lambda
- “sub-ms, cache, session storage, reduce DB calls” → ElastiCache
- “durable Redis, persistent in-memory, no data loss” → MemoryDB for Redis
- “social network, fraud detection, relationship traversal” → Neptune
- “data warehouse, OLAP, petabyte analytics, BI” → Redshift
- “RDS to analytics without ETL pipeline” → Redshift Zero-ETL
- “query S3 data with SQL” → Redshift Spectrum
- “IoT sensor, time-series, metrics, timestamps” → Timestream
- “immutable audit trail, financial ledger, cryptographic history” → QLDB
- “decentralized blockchain, multiple parties, trustless” → Managed Blockchain (NOT QLDB)
- “MongoDB-compatible, JSON documents, flexible schema” → DocumentDB
- “Cassandra-compatible, wide-column, migrate Cassandra” → Keyspaces
- “Oracle/SQL Server + OS access, custom agent, SSH to host” → RDS Custom
⚠️ Common Exam Traps
- OLTP ≠ OLAP — never run analytics on RDS; never run transactions on Redshift
- ElastiCache = cache (data loss acceptable on failure); MemoryDB = durable database (no data loss)
- QLDB ≠ Managed Blockchain — QLDB is centralized (you own it); Blockchain is decentralized
- DynamoDB DAX ≠ ElastiCache — DAX is DynamoDB-specific only; ElastiCache is general-purpose
- Aurora Multi-AZ ≠ Aurora Global — Multi-AZ = same-region failover; Global = cross-region reads + DR
- RDS read replicas are async (eventual consistency); Aurora reader nodes are near-sync (in-cluster)
- DocumentDB is MongoDB wire-protocol compatible but runs Aurora storage — not a MongoDB fork
- Neptune = graph (relationship-first); don't use RDS JOINs for multi-hop traversals at scale
- Redshift is columnar (great for SELECT/SUM/GROUP BY); RDS is row-based (great for OLTP inserts)
- RDS Custom = managed + OS access (Oracle/SQL Server only); standard RDS = fully managed, no OS access