Sharing notes from my ongoing learning journey — what I build, break and understand along the way.
The Ultimate Guide to AWS Databases: RDS, Aurora, DynamoDB & More
What I Learned About AWS Databases (RDS, Aurora, DynamoDB) After 2 Days of Deep Diving
This guide was created after completing my AWS database training and is meant to help others (and myself) consolidate key concepts — from the basics to advanced usage of RDS and more.
1. What is a Database?
A database is a system where data is stored, accessed, and managed in an organized way.
Example: In an e-commerce platform, user details, order history, and product listings are stored in a database.
2. Why Use a Database?
Traditional Method | With a Database |
---|---|
Data is scattered across files | Data is stored centrally |
Searching is difficult | Easy querying capabilities |
Concurrent access is complex | Multi-user support |
Data inconsistency is common | Ensures data integrity (ACID) |
3. Database Models and Structure
3.1. Basic Concepts:
- Table: Structure where data is held in rows and columns
- Row: Represents a single record (e.g., a user)
- Column: Represents data fields (e.g., name, email)
4. Relational vs Non-Relational Databases
Feature | Relational | Non-Relational |
---|---|---|
Data model | Table-based | Document, key-value, graph, column |
Schema | Fixed | Flexible |
Query language | SQL | NoSQL / API |
Consistency | High (ACID) | Usually eventual consistency |
Best for | Financial, ERP, CRM | IoT, mobile, analytics |
5. Example of a Relational Database
Table: Users
ID | Name | |
---|---|---|
1 | John Doe | john@example.com |
2 | Emma Johnson | emma@example.com |
This structure represents basic user information in a relational database.
6. Why Choose Relational Databases?
Advantages:
- Strong consistency (ACID compliance)
- Advanced querying using SQL
- Referential integrity
- Normalization and schema control
7. When to Use NoSQL?
NoSQL is better suited if:
- You have unstructured or semi-structured data (e.g., user comments)
- You need real-time analytics or large-scale data processing
- You require high scalability and flexible schemas
AWS NoSQL Solution: Amazon DynamoDB
8. AWS Database Options
Service | Type | Use Case |
---|---|---|
Amazon RDS | Relational | Web apps, CRM, ERP |
Amazon Aurora | High-performance relational | High availability |
Amazon DynamoDB | NoSQL | IoT, gaming, mobile apps |
Amazon Redshift | Data warehouse | Analytics, big data |
Amazon DocumentDB | Document DB | MongoDB-compatible apps |
ElastiCache | In-memory cache | Redis / Memcached |
Neptune | Graph database | Social networks, relationships |
Timestream | Time series | IoT data, logs, sensors |
9. What is Amazon RDS?
Amazon RDS (Relational Database Service) is a fully managed service that makes it easy to set up, operate, and scale a relational database in the cloud.
Setting up RDS for the first time was easier than expected — the defaults were good enough to get started.
Key Features:
- Automatic backups
- Multi-AZ deployments
- Read Replicas
- VPC, IAM, and Security Groups integration
- CloudWatch performance monitoring
Supported Database Engines:
- MySQL
- PostgreSQL
- Oracle
- SQL Server
- MariaDB
- Amazon Aurora
10. RDS Architecture: How Does It Work?
Core Components:
- Primary Instance: Handles all writes and reads
- Read Replica: Used for read-heavy traffic; async copy of primary
- Multi-AZ: A standby copy in a different Availability Zone for failover
Sample Scenario:
- EC2 Web Server in a Public Subnet
- RDS (MySQL) in a Private Subnet
- Internet access via NAT Gateway (for RDS outbound only)
11. RDS Backup, High Availability, and Recovery
- Automated Backups: Daily snapshots and transaction logs
- Manual Snapshots: Manually created, restorable backups
- Point-in-Time Recovery: Restore to any second within retention window
12. RDS Replication Methods
a) Read Replicas
- Used to offload read traffic
- Helps improve application performance
b) Multi-AZ Deployment
- Automatic standby copy in another AZ
- Promotes standby in case of failure
13. RDS Security
- VPC & Subnets: Isolate your RDS instances within your private network
- Security Groups: Control IP and port access to the database
- IAM: Manage permissions for users and services
- Encryption: Data encryption at rest and in transit using KMS and TLS
14. RDS Pricing and Performance Options
Factor | Description |
---|---|
Instance type | On-Demand or Reserved |
Storage type | General Purpose SSD (gp2/gp3) or Provisioned IOPS |
Backup retention | Between 1–35 days |
Data transfer | Outbound data is billed |
Read replicas | Each replica adds cost |
15. Real-World Architecture Example
Architecture Overview:
- VPC CIDR: 10.0.0.0/16
- Availability Zones:
us-east-1a
: Public Subnetus-east-1b
: Private Subnet
Deployment:
- Public Subnet: EC2 web server
- Private Subnet: RDS (MySQL) instance
Security Group Rules:
Resource | Ports | Description |
---|---|---|
EC2 | 80, 443, 22 | HTTP, HTTPS, SSH (limited to admin IP) |
RDS | 3306 | Only accessible from EC2 private IP |
Understanding databases on AWS requires both theoretical knowledge and hands-on practice.
In this guide, we explored:
- Fundamental database concepts
- Relational vs Non-relational models
- How to implement databases using AWS services like RDS and Aurora
- Key features such as replication, backup, recovery, and pricing
Get your hands dirty! Try launching an Amazon RDS instance via the AWS Console and build a small web app that connects to it. Practical experience is the best teacher.