Database Services
Overview
AWS offers purpose-built databases: instead of forcing every problem into one database, you choose the type that fits the data and access pattern. Most are managed services, meaning AWS handles provisioning, patching, backups and failover.
Think of a toolbox. A relational database is a sturdy filing cabinet with strict, related folders. A key-value NoSQL database is a locker room where you fetch items instantly by number. A data warehouse is an archive room built for big analysis, and a cache is the desk drawer for things you use every minute.
The exam asks you to match a requirement - "relational", "key-value with single-digit millisecond latency", "in-memory cache", "graph", "data warehouse" - to the correct service.
Key Concepts
- Amazon RDS is a managed relational database service supporting MySQL, PostgreSQL, MariaDB, Oracle, SQL Server and Db2.
- Amazon Aurora is an AWS-built MySQL- and PostgreSQL-compatible relational database with higher performance and up to 15 read replicas; Aurora Serverless scales automatically.
- Amazon DynamoDB is a serverless NoSQL key-value and document database with single-digit millisecond performance at any scale.
- Amazon ElastiCache (Redis OSS / Valkey, Memcached) is an in-memory cache that speeds up applications.
- Amazon Redshift is a data warehouse for large-scale analytical (OLAP) queries using SQL.
- Amazon DocumentDB (MongoDB-compatible), Amazon Neptune (graph), Amazon Keyspaces (Cassandra), Amazon Timestream (time series) have dedicated services.
- RDS Multi-AZ gives high availability via a standby in another AZ; read replicas scale read traffic.
- AWS Database Migration Service (DMS) and Schema Conversion Tool help migrate databases to AWS.
Detailed Notes
Match the database to the need
| Need | Service | Notes |
|---|---|---|
| Traditional relational (SQL), joins, transactions | RDS | Managed engines, Multi-AZ, read replicas |
| High-performance relational, cloud-native | Aurora | MySQL/PostgreSQL compatible, 6 copies of data across 3 AZs |
| Serverless key-value / document at massive scale | DynamoDB | Single-digit ms, global tables, on-demand capacity |
| Microsecond caching | ElastiCache / DynamoDB DAX | In-memory |
| Data warehouse / analytics (SQL) | Redshift | Columnar storage, petabyte scale |
| MongoDB-compatible documents | DocumentDB | Managed |
| Highly connected data (graph) | Neptune | Social networks, fraud detection |
| Time series (IoT metrics) | Timestream | Purpose-built |
| Wide-column Cassandra workloads | Keyspaces | Managed |
Relational versus NoSQL
| Aspect | Relational (RDS/Aurora) | NoSQL (DynamoDB) |
|---|---|---|
| Schema | Fixed tables and relationships | Flexible items |
| Query | SQL with joins | Key-based and index queries |
| Scaling | Vertical plus read replicas | Horizontal, virtually unlimited |
| Typical use | ERP, e-commerce orders | Sessions, carts, leaderboards, IoT |
What RDS manages for you
AWS handles hardware provisioning, OS and database patching, automated backups, point-in-time recovery and failover. You manage the schema, queries, users and network access. You cannot SSH into RDS instances (except RDS Custom).
| Feature | Purpose |
|---|---|
| Multi-AZ | High availability: synchronous standby, automatic failover |
| Read replicas | Performance: offload read traffic, can be cross-Region |
| Automated backups | Daily snapshot plus transaction logs, up to 35 days retention |
| Manual snapshots | Kept until deleted |
Multi-AZ is for availability; read replicas are for scaling reads. The exam loves this distinction.
aws rds create-db-instance --db-instance-identifier orders-db \
--engine postgres --db-instance-class db.t3.micro --allocated-storage 20 \
--master-username admin --manage-master-user-password --multi-az
DynamoDB at a glance
{
"TableName": "Carts",
"KeySchema": [{ "AttributeName": "userId", "KeyType": "HASH" }],
"AttributeDefinitions": [{ "AttributeName": "userId", "AttributeType": "S" }],
"BillingMode": "PAY_PER_REQUEST"
}
Highlights: on-demand or provisioned capacity, global tables for multi-Region active-active, DynamoDB Streams, point-in-time recovery and DAX for microsecond caching.
Aurora highlights
Aurora replicates data six ways across three AZs, fails over quickly, and offers Aurora Serverless v2 that scales capacity automatically, and Aurora Global Database for cross-Region reads and disaster recovery.
Self-managed versus managed databases
| Aspect | Database on EC2 | Managed (RDS, Aurora, DynamoDB) |
|---|---|---|
| Patching and upgrades | You | AWS |
| Backups and failover | You script it | Built in (Multi-AZ, automated backups) |
| OS access | Full | Limited or none |
| Customisation | Maximum (any version, plugin) | Within supported features |
| Staff effort | High | Low |
Choose EC2-hosted only when you need an unsupported engine or deep OS control.
Migration
AWS DMS moves data between databases with minimal downtime, including heterogeneous migrations (for example Oracle to Aurora PostgreSQL) combined with the Schema Conversion Tool.
Real World Example
An e-commerce company stores orders and customer accounts in Amazon Aurora PostgreSQL (relational, transactional) with Multi-AZ failover. Shopping carts and sessions live in DynamoDB for fast key lookups that scale for flash sales, and a product catalogue cache in ElastiCache cuts database reads.
Nightly, data is loaded into Amazon Redshift where analysts run sales reports without slowing the production databases.
Architecture Diagram
- 1The application checks ElastiCache first for hot data.
- 2Transactional order data is read and written in Aurora or RDS.
- 3Key-value data such as carts goes to DynamoDB.
- 4Data is periodically copied to Redshift for analytics.
Best Practices
- ✓Pick a purpose-built database for each access pattern.
- ✓Use Multi-AZ for production RDS and read replicas for read-heavy load.
- ✓Encrypt databases with KMS and keep them in private subnets.
- ✓Use Secrets Manager to rotate database credentials.
- ✓Use DynamoDB on-demand for unpredictable traffic and enable point-in-time recovery.
Common Interview Questions
Exam Tips
CLF-C02 focus
- "Relational" = RDS / Aurora; "key-value, serverless" = DynamoDB.
- "Data warehouse" = Redshift; "in-memory cache" = ElastiCache; "graph" = Neptune.
- "High availability for RDS" = Multi-AZ; "improve read performance" = read replica.
- "Migrate databases with minimal downtime" = AWS DMS.
Finished this lesson?
0 of 43 lessons done · 0% of the course

