Database Services: RDS, DynamoDB, Aurora
Choose the right AWS database service by workload pattern, scaling model, and operational responsibility.
What Is It? (ELI5)
RDS is a managed SQL database, DynamoDB is a managed NoSQL key-value/document database, and Aurora is a cloud-optimized relational engine for high performance.
Why Do We Need It?
- Apps have different data models and query patterns.
- Managed services reduce patching and backup burden.
- Correct service choice improves cost and reliability.
How It Works (Technical)
| Service | Model | Best For | Azure Equivalent |
|---|---|---|---|
| RDS | Relational (MySQL/PostgreSQL/SQL Server) | Transactional apps with SQL queries | Azure SQL / Azure Database for PostgreSQL/MySQL |
| DynamoDB | NoSQL key-value/document | High-scale low-latency workloads | Cosmos DB (NoSQL API) |
| Aurora | Relational, cloud-native | High throughput with managed failover | Azure SQL Hyperscale (approx) |
Hands-on
# Create DynamoDB table aws dynamodb create-table --table-name Orders \ --attribute-definitions AttributeName=OrderId,AttributeType=S \ --key-schema AttributeName=OrderId,KeyType=HASH \ --billing-mode PAY_PER_REQUEST # List RDS instances aws rds describe-db-instances --query "DBInstances[].DBInstanceIdentifier" --output table
Debugging Scenario
Problem
Application timeouts after migration to RDS.
- Check security group rules between app and DB.
- Validate connection pool size and max connections.
- Inspect slow query logs and missing indexes.
Interview Questions
Beginner: Difference between RDS and DynamoDB?
RDS is SQL relational; DynamoDB is NoSQL key-value/document.
RDS is SQL relational; DynamoDB is NoSQL key-value/document.
Intermediate: Why choose Aurora over standard RDS engine?
Better performance/storage architecture with managed HA characteristics.
Better performance/storage architecture with managed HA characteristics.
Scenario: Flash-sale traffic reaches 100k requests/sec. Which DB design fits?
Use DynamoDB for hot key-value access with proper partition design and caching.
Use DynamoDB for hot key-value access with proper partition design and caching.
Real-world Usage
SaaS platforms commonly use Aurora for core transactions and DynamoDB for session/cart data requiring millisecond reads.
Summary
- RDS and Aurora for relational consistency and SQL workloads.
- DynamoDB for massive scale and simple access patterns.
- Schema and query design drive service choice more than brand preference.