AWS offers dozens of database services. Knowing when to use each one is critical for certification exams. This guide breaks down the key services and decision criteria.
The Database Decision Framework
Before diving into services, understand the key questions:
- Data structure? Relational vs Non-relational
- Scale requirements? Millions vs billions of records
- Access patterns? Complex queries vs key-value lookups
- Latency needs? Milliseconds vs seconds acceptable
- Cost constraints? Serverless vs provisioned
Core Database Services
RDS (Relational Database Service)
Managed relational databases supporting:
- MySQL
- PostgreSQL
- MariaDB
- Oracle
- SQL Server
Key Features
- Automated backups
- Multi-AZ for high availability
- Read replicas for scaling reads
- Automated patching
When to Use RDS
- Complex queries with JOINs
- ACID compliance required
- Existing relational database skills
- Traditional application architecture
Multi-AZ vs Read Replicas
| Feature | Multi-AZ | Read Replicas |
|---|---|---|
| Purpose | High availability | Read scaling |
| Replication | Synchronous | Asynchronous |
| Failover | Automatic | Manual promotion |
| Same region | Yes | Can be cross-region |
| Reads | No (standby) | Yes |
Aurora
AWS's cloud-native relational database:
- MySQL and PostgreSQL compatible
- 5x faster than standard MySQL
- 3x faster than standard PostgreSQL
- Auto-scales storage (10GB to 128TB)
Aurora Serverless
- On-demand, auto-scaling
- Pay per second
- Great for variable workloads
When to Use Aurora
- High performance relational needs
- Large databases (multi-TB)
- Variable or unpredictable workloads (Serverless)
- MySQL/PostgreSQL compatibility needed
DynamoDB
Fully managed NoSQL database:
- Key-value and document data
- Single-digit millisecond latency
- Scales to any size
- Serverless (pay per request option)
Key Concepts
- Partition key - Required, determines data distribution
- Sort key - Optional, enables range queries
- GSI - Global Secondary Index for alternate queries
- LSI - Local Secondary Index (same partition key)
Capacity Modes
- Provisioned - You specify read/write capacity
- On-demand - Pay per request, auto-scales
When to Use DynamoDB
- Key-value access patterns
- Extreme scale requirements
- Low latency critical
- Serverless architecture
ElastiCache
In-memory caching:
- Redis - Data structures, persistence, replication
- Memcached - Simple caching, multi-threaded
When to Use ElastiCache
- Database query caching
- Session management
- Real-time analytics
- Leaderboards (Redis sorted sets)
Redis vs Memcached
| Feature | Redis | Memcached |
|---|---|---|
| Data types | Rich (lists, sets, hashes) | Simple (strings) |
| Persistence | Yes | No |
| Replication | Yes | No |
| Multi-threaded | No | Yes |
| Use case | Complex caching | Simple caching |
Redshift
Data warehouse for analytics:
- Petabyte-scale
- Columnar storage
- SQL-based queries
- MPP (Massively Parallel Processing)
When to Use Redshift
- Business intelligence
- Analytics workloads
- Historical data analysis
- Complex aggregations
Other Database Services
DocumentDB - MongoDB compatible Neptune - Graph database Timestream - Time series database QLDB - Immutable ledger database Keyspaces - Cassandra compatible
Decision Tree
Need a database?
- Relational data with complex queries?
- Need extreme performance? Use Aurora
- Standard workload? Use RDS
- Variable workload? Use Aurora Serverless
- Key-value or document data? Use DynamoDB
- Need caching?
- Complex data types? Use ElastiCache Redis
- Simple caching? Use ElastiCache Memcached
- Analytics/warehouse? Use Redshift
- Graph relationships? Use Neptune
- Time series data? Use Timestream
Common Exam Scenarios
Scenario 1: "E-commerce site needs to handle Black Friday traffic spikes"
Answer: DynamoDB with on-demand capacity or Aurora Serverless
Scenario 2: "Application needs sub-millisecond response for session data"
Answer: ElastiCache Redis
Scenario 3: "Migrate Oracle database with minimal changes"
Answer: RDS for Oracle or use AWS DMS
Scenario 4: "Need to run complex analytical queries on years of sales data"
Answer: Redshift
Scenario 5: "Social network needs to query friend relationships"
Answer: Neptune (graph database)
Scenario 6: "Gaming app needs real-time leaderboard"
Answer: ElastiCache Redis with sorted sets
RDS Deep Dive
Backup and Recovery
- Automated backups: Point-in-time recovery (35-day retention)
- Manual snapshots: User-initiated, persist until deleted
- Cross-region snapshots: For DR
Security
- Deploy in private subnets
- Security groups for access control
- Encryption at rest (KMS)
- IAM database authentication
Performance
- Read replicas for read scaling
- Provisioned IOPS for consistent performance
- Enhanced monitoring
- Performance Insights
DynamoDB Deep Dive
Data Modeling
Single Table Design
- Store multiple entity types in one table
- Use composite keys
- Reduces costs and latency
Access Patterns First
- Design for your queries
- Choose partition key for even distribution
- Use GSIs for alternate access patterns
Consistency Models
- Eventually Consistent: Default, lower cost
- Strongly Consistent: Read after write guaranteed, higher cost
DynamoDB Accelerator (DAX)
- In-memory cache for DynamoDB
- Microsecond latency
- API compatible
Hands-On Labs
Complete these before your exam:
- Create RDS Multi-AZ deployment
- Set up RDS read replica
- Create DynamoDB table with GSI
- Configure DynamoDB auto-scaling
- Set up ElastiCache Redis cluster
- Create Aurora Serverless database
Quick Reference
RDS Engine Choices
- MySQL, PostgreSQL → Most common, open source
- Aurora → AWS optimized, best performance
- Oracle, SQL Server → Commercial, licensing costs
DynamoDB Limits
- Item size: 400KB max
- Partition key: 2048 bytes
- Sort key: 1024 bytes
ElastiCache Use Cases
- Database caching → Both
- Session storage → Redis
- Leaderboards → Redis
- Simple key-value → Memcached
Identify Your Database Gaps
Databases are heavily tested on AWS exams. Do you know the differences between RDS, Aurora, DynamoDB, ElastiCache, and Redshift?
StudyTech's AI identifies your exact database gaps:
- Which database services you understand vs. which confuse you
- Decision-making scenarios you keep getting wrong
- Configuration details that trip up most learners
- Performance optimization concepts you're missing
Over 1,000 learners are using StudyTech to master AWS databases faster. Our AI creates a personalized study plan in 10 minutes.
Stop memorizing database features. Start understanding when to use each one.