Explore the different database options available on AWS
• Why we need databases beyond simple storage
• Relational vs. NoSQL databases
• Amazon RDS and Aurora
• Amazon DynamoDB and DAX
• Amazon ElastiCache and Redshift
Just like a library organizes books with catalogs, indexes, and structured sections, databases organize data for efficient storage, retrieval, and management!
• Storing data on disk (EFS, EBS, EC2, S3) has limitations
• Databases provide structured data storage
• Enable efficient querying and indexing
• Optimized for specific purposes with different features and constraints
While Excel is great for small datasets, databases handle massive amounts of data with better performance, security, and concurrent access capabilities.
Relational databases organize data into tables with rows and columns, similar to Excel spreadsheets.
Uses Structured Query Language (SQL) to perform queries and lookups
Tables can be related to each other through keys
Data follows a predefined schema
| roll no | Name | Class |
|---|---|---|
| 1 | Yash | 2nd year |
| 2 | Vikram | Completed |
| course | name |
|---|---|
| bsc | yash |
| bca | vikram |
NoSQL (non-SQL/non-relational) databases provide flexible data models for modern applications.
Easy to evolve data models as requirements change
Designed to scale-out using distributed clusters
Optimized for specific data models and access patterns
AWS offers managed database services that handle the heavy lifting of database administration.
• Quick provisioning
• High availability built-in
• Vertical and horizontal scaling
• Automated backups and restore
• Automated upgrades and OS patching
Running databases on EC2 is like maintaining your own car - you handle all repairs and maintenance. AWS managed databases are like using a car service - they handle everything for you!
Amazon Relational Database Service (RDS) makes it easy to set up, operate, and scale relational databases in the cloud.
• PostgreSQL
• MySQL
• MariaDB
• Oracle
• Microsoft SQL Server
• Aurora (AWS Proprietary database)
You cannot SSH into RDS instances. AWS manages the underlying infrastructure for you.
📊 → 🔄 → 📊
Primary DB Instance → Synchronous Replication → Standby Replicas
Aurora is AWS's proprietary high-performance relational database engine.
5x performance improvement over MySQL, 3x over PostgreSQL
Storage automatically grows in 10GB increments up to 128TB
Pay per second, 20% more than RDS but more efficient
• Compatible with PostgreSQL and MySQL
• Highly available and durable by design
• Serverless option available
• Continuous backup to S3
ElastiCache provides fully managed Redis and Memcached in-memory data stores.
Think of ElastiCache as your application's short-term memory - extremely fast but volatile, perfect for caching frequently accessed data.
• Reduces load off databases for read-intensive workloads
• High performance and low latency
• AWS handles OS patching, optimizations, setup, monitoring
• Automatic failure recovery and backups
👥 → ⚡ → 💾
Users → ElastiCache (Cache) → Database (Persistence)
DynamoDB is AWS's flagship fully managed NoSQL database service.
Scales to massive workloads, millions of requests per second
Single-digit millisecond latency
No servers to provision or manage
• Fully managed with replication across 3 AZs
• Integrated with IAM for security and administration
• Key/Value and document data models
• Auto-scaling capacity
Create tables without database, use partition keys like user_id, and store all data in a single table (no relationships like in RDS).
Fully managed in-memory cache for DynamoDB
10x performance improvement
Secure, highly available, and scalable
Data warehousing for analytics
Based on PostgreSQL but for OLAP
Columnar storage for better analytics performance
Automatically provisions and scales
Run analytics without managing infrastructure
Pay only for what you use
• DAX is specifically for DynamoDB only
• ElastiCache can be used with various databases
• Architecture: User → DAX → DynamoDB Tables
Perfect for business intelligence, analytics, and data warehousing where you load data periodically (e.g., every hour) rather than continuously.
• Databases provide structured data storage beyond simple file systems
• Relational databases use tables and SQL (RDS, Aurora)
• NoSQL databases offer flexibility and scalability (DynamoDB)
• In-memory databases provide caching for performance (ElastiCache, DAX)
• Data warehousing enables analytics (Redshift)
Structured data with relationships → RDS/Aurora
Flexible schema, high scale → DynamoDB
Caching needs → ElastiCache/DAX
Analytics and reporting → Redshift
1. Experiment with creating different database types
2. Try the DynamoDB practical exercise
3. Compare performance between different options
4. Explore how databases integrate with other AWS services!