Databases in AWS – RDS, DynamoDB, Aurora
Scalable, Reliable, and Managed Database Services for Every Application
Databases are a core building block of modern applications, and AWS offers fully managed services to support relational, non-relational, and hybrid database workloads. This chapter explores the key AWS database offerings, focusing on Amazon RDS, Amazon DynamoDB, and Amazon Aurora.
🧱 AWS Database Service Landscape
Service | Type | Use Case |
---|---|---|
Amazon RDS | Relational DB | Traditional apps, CMS, ERP |
Amazon Aurora | Relational DB | Cloud-optimized, highly available |
Amazon DynamoDB | NoSQL DB | High-speed, scalable, serverless |
Amazon ElastiCache | In-memory | Caching, real-time apps |
Amazon Redshift | Data warehouse | Analytics, reporting, BI |
Amazon Neptune | Graph DB | Relationship-driven data |
📌 In this chapter, we’ll focus on RDS, Aurora, and DynamoDB, the three most used options for developers and businesses.
Section 1: Amazon RDS (Relational Database Service)
🔍 What is RDS?
Amazon RDS is a managed service that makes it easy to set up, operate, and scale relational databases in the cloud.
Supported Engines:
- MySQL
- PostgreSQL
- MariaDB
- Oracle
- SQL Server
✅ AWS handles backups, patching, monitoring, scaling, and replication.
⚙️ RDS Architecture Options
Feature | Description |
---|---|
Single AZ | One database in one Availability Zone |
Multi-AZ | Primary + automatic standby in another AZ |
Read Replicas | Read-only replicas for scaling reads |
Encryption | Enable at launch with KMS |
Monitoring | Integrated with CloudWatch |
Backups | Automated backups (7–35 days retention) |
Creating RDS Instance (Console)
- Go to RDS → Create database
- Choose Standard Create
- Engine: e.g., PostgreSQL
- DB instance class: e.g.,
db.t3.micro
- Multi-AZ deployment: Enable for production
- Set master credentials
- Storage: 20 GB GP2
- Enable backups, monitoring
- Launch
✅ Security & Access
- Place RDS in private subnet
- Use security groups to allow access only from app instances
- Never expose RDS to public internet
- Enable IAM DB authentication for MySQL and PostgreSQL
- Use SSL for connections
📊 RDS Pricing Tips
- Use burstable instances (
db.t3
) for dev/test - Enable storage auto-scaling
- Disable Multi-AZ for non-critical workloads
- Use Reserved Instances for long-term production use (up to 70% off)
Section 2: Amazon Aurora – Cloud-Native Relational Database
🔍 What is Amazon Aurora?
Amazon Aurora is a MySQL- and PostgreSQL-compatible relational database built for the cloud.
- Up to 5x faster than MySQL, 3x faster than PostgreSQL
- Auto-healing, multi-AZ replication, and serverless option
- Storage autoscaling from 10 GB up to 128 TB
🚀 Aurora Key Features
Feature | Description |
---|---|
Aurora Clusters | Consists of 1 writer and multiple readers |
Aurora Replicas | Low-latency read replicas |
Aurora Serverless v2 | Auto scales instantly based on demand |
Global Databases | Multi-region replication in < 1s |
Backtrack | Rollback database in seconds without restore |
Fast Cloning | Clone entire DBs instantly for testing/dev |
Aurora vs RDS
Feature | Aurora | RDS |
---|---|---|
Performance | 3–5x faster | Standard |
Pricing | Per-second billing (serverless) | Per-hour instance billing |
Auto Scaling | Yes (storage + compute) | Storage only |
Multi-AZ | Built-in + 6 replicas | Optional standby |
Compatibility | MySQL & PostgreSQL | Multiple engines |
Aurora Use Cases
- Large-scale web applications
- SaaS platforms with bursty traffic
- Global apps needing read/write performance
- Financial services requiring instant failover
Section 3: Amazon DynamoDB – NoSQL at Any Scale
🔍 What is DynamoDB?
Amazon DynamoDB is a fully managed NoSQL database that offers single-digit millisecond latency at any scale.
- No servers to manage
- Automatically scales based on traffic
- Supports key-value and document data models
- Built-in replication, encryption, and TTL (Time To Live)
🧱 Core DynamoDB Concepts
Term | Description |
---|---|
Table | Collection of items (similar to rows) |
Item | Single data object (like a row) |
Attribute | Field in an item |
Primary Key | Unique identifier (partition key or partition + sort key) |
Throughput | Read/write capacity (RCU/WCU) or on-demand |
GSI/LSI | Secondary indexes for query flexibility |
✅ When to Use DynamoDB
- High-velocity applications (gaming, IoT, mobile)
- Shopping carts, session stores
- Serverless APIs with low-latency needs
- Multi-region applications
DynamoDB Example (AWS CLI)
Create Table:
aws dynamodb create-table \
--table-name Products \
--attribute-definitions AttributeName=ProductID,AttributeType=S \
--key-schema AttributeName=ProductID,KeyType=HASH \
--billing-mode PAY_PER_REQUEST
Put Item:
aws dynamodb put-item \
--table-name Products \
--item '{"ProductID": {"S": "1001"}, "Name": {"S": "Mouse"}}'
DynamoDB Features
Feature | Use |
---|---|
DAX (in-memory cache) | 10x read speed boost |
Streams | Trigger Lambda functions on item changes |
Time To Live (TTL) | Auto-expire old items |
Global Tables | Multi-region replication |
Fine-Grained Access Control | Row- and column-level IAM rules |
Summary Table: RDS vs Aurora vs DynamoDB
Feature | RDS | Aurora | DynamoDB |
---|---|---|---|
Type | Relational | Relational | NoSQL |
Scaling | Manual | Auto-scaling | Fully serverless |
Performance | Moderate | High-performance | Ultra-fast |
Backup | Automatic | Auto + backtrack | Point-in-time restore |
Cost Model | Per instance | Instance/serverless | On-demand/per request |
Use Case | Traditional apps | Scalable web apps | High-velocity workloads |
💡 Explore More AWS Tools & Resources
Educational AI Tutor
Get instant AWS-related answers and explanations using AI.
Interview Question Generator
Generate AWS interview questions for practice and preparation.
AWS Practice Quiz
Test your AWS knowledge with timed quizzes and scoring.
AWS Interview Questions
Browse frequently asked AWS interview questions with answers.