3.5 Database Services — RDS, Aurora, DynamoDB, and More
Key Takeaways
- RDS supports six engines (MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Db2) with automated backups, patching, and Multi-AZ failover.
- Aurora is AWS-built and MySQL/PostgreSQL compatible with up to 5x better performance than MySQL and 3x better than PostgreSQL, plus 6-way replication across 3 AZs.
- DynamoDB is a serverless NoSQL key-value/document database with single-digit millisecond latency, auto-scaling, and Global Tables for multi-Region active-active.
- ElastiCache provides in-memory caching with Redis (rich features, persistence) or Memcached (simple, multi-threaded) for sub-millisecond response times.
- Amazon Redshift is a data warehouse for analytics (OLAP) — not for transactional (OLTP) workloads.
Database Services — RDS, Aurora, DynamoDB, and More
Quick Answer: Use RDS/Aurora for relational data (SQL). Use DynamoDB for key-value/NoSQL at any scale. Use ElastiCache (Redis/Memcached) for caching. Use Redshift for data warehousing/analytics. Use Neptune for graph data. Use DocumentDB for MongoDB-compatible workloads. Choose the purpose-built database that matches your data model and access patterns.
Amazon RDS (Relational Database Service)
RDS is a managed relational database service supporting six database engines.
RDS Engines
| Engine | Compatibility | Max Storage |
|---|---|---|
| MySQL | MySQL | 64 TB |
| PostgreSQL | PostgreSQL | 64 TB |
| MariaDB | MariaDB | 64 TB |
| Oracle | Oracle | 64 TB |
| SQL Server | SQL Server | 16 TB |
| IBM Db2 | IBM Db2 | 64 TB |
RDS Managed Features
| Feature | Detail |
|---|---|
| Automated backups | Daily snapshots + transaction logs (point-in-time recovery up to 35 days) |
| Multi-AZ | Synchronous standby replica with automatic failover (60-120 seconds) |
| Read replicas | Up to 15 (Aurora) / 5 (other engines); async replication |
| Patching | Automated OS and database engine patching during maintenance windows |
| Monitoring | CloudWatch metrics + Performance Insights + Enhanced Monitoring |
| Encryption | At rest (KMS) and in transit (SSL/TLS) |
RDS Read Replicas vs. Multi-AZ
| Feature | Read Replicas | Multi-AZ |
|---|---|---|
| Purpose | Read scaling | High availability |
| Replication | Asynchronous | Synchronous |
| Readable? | Yes (serve read traffic) | No (standby only) |
| Cross-Region | Yes | No (same Region) |
| Failover | Manual promotion | Automatic (60-120s) |
| Use case | Read-heavy workloads, reporting | Production HA |
On the Exam: "Scale read-heavy database workload" → Read replicas. "Automatic failover for database HA" → Multi-AZ. You can combine both for read scaling AND high availability.
Amazon Aurora
Aurora is an AWS-designed relational database compatible with MySQL and PostgreSQL, delivering up to 5x MySQL performance and 3x PostgreSQL performance.
Aurora Architecture
| Feature | Detail |
|---|---|
| Storage | 6 copies of data across 3 AZs (automatically) |
| Durability | Tolerate loss of 2 copies for writes, 3 copies for reads |
| Auto-scaling storage | 10 GB to 128 TB, grows automatically in 10 GB increments |
| Read replicas | Up to 15 with <10ms replica lag |
| Failover | <30 seconds (promotes a read replica) |
| Backtracking | Rewind database to a point in time without restoring from backup |
| Cloning | Create a copy of database using copy-on-write (instant, no storage cost initially) |
Aurora Serverless v2
| Feature | Detail |
|---|---|
| Scaling | Instantly scales compute from 0.5 to 256 ACUs (Aurora Capacity Units) |
| Use case | Variable/unpredictable workloads, dev/test, multi-tenant |
| Billing | Per ACU per second |
| Minimum | 0.5 ACU when idle (not zero — use Serverless v1 for scale-to-zero) |
Amazon DynamoDB
DynamoDB is a serverless NoSQL database providing single-digit millisecond performance at any scale.
DynamoDB Features
| Feature | Detail |
|---|---|
| Data model | Key-value and document |
| Latency | Single-digit millisecond reads/writes |
| Scaling | Automatic (on-demand) or provisioned with auto-scaling |
| Global Tables | Active-active multi-Region replication |
| DAX | DynamoDB Accelerator — in-memory cache for microsecond reads |
| Streams | Capture item-level changes (trigger Lambda, replicate data) |
| TTL | Automatically delete expired items at no cost |
| PITR | Point-in-time recovery (continuous backups up to 35 days) |
DynamoDB Capacity Modes
| Mode | Description | Best For |
|---|---|---|
| On-Demand | Pay per request, no capacity planning | Unpredictable traffic, new applications |
| Provisioned | Set RCUs/WCUs with optional auto-scaling | Predictable traffic, cost optimization |
DynamoDB Accelerator (DAX)
DAX is an in-memory cache for DynamoDB that delivers microsecond response times:
- Fully managed, Multi-AZ
- Compatible with existing DynamoDB API calls (drop-in replacement)
- Ideal for read-heavy workloads with repeated reads of the same items
Amazon ElastiCache
ElastiCache provides managed in-memory data stores for caching.
Redis vs. Memcached
| Feature | Redis | Memcached |
|---|---|---|
| Data structures | Strings, hashes, lists, sets, sorted sets, streams | Simple key-value |
| Persistence | Yes (snapshots + AOF) | No |
| Replication | Multi-AZ with automatic failover | No replication |
| Clustering | Yes (up to 500 nodes) | Yes (up to 40 nodes) |
| Pub/Sub | Yes | No |
| Backup/Restore | Yes | No |
| Multi-threaded | Single-threaded (per shard) | Multi-threaded |
| Use case | Session store, leaderboards, real-time analytics | Simple caching, session store |
On the Exam: "In-memory cache with replication and persistence" → ElastiCache for Redis. "Simple caching layer, multi-threaded" → ElastiCache for Memcached.
Other Database Services
| Service | Type | Use Case |
|---|---|---|
| Amazon Redshift | Columnar data warehouse (OLAP) | BI, analytics, reporting on petabytes of data |
| Amazon Neptune | Graph database | Social networks, knowledge graphs, fraud detection |
| Amazon DocumentDB | MongoDB-compatible document DB | Content management, catalogs, user profiles |
| Amazon Keyspaces | Cassandra-compatible | Wide-column NoSQL, time-series data |
| Amazon Timestream | Time-series database | IoT, DevOps metrics, application monitoring |
| Amazon QLDB | Immutable ledger database | Financial transactions, supply chain, regulatory |
| Amazon MemoryDB | Redis-compatible, durable | Ultra-fast durable database (not just cache) |
A web application needs a relational database with automatic failover, up to 15 read replicas, and storage that automatically scales. Which database service is the BEST fit?
A gaming leaderboard requires sub-millisecond read latency with automatic scaling. Which database should be used?
Which caching solution provides automatic Multi-AZ failover and data persistence?