03. AWS RDS & Amazon Aurora
01. AWS RDSβ
Amazon RDS (Relational Database Service) is a fully managed service for relational databases on AWS.
It allows you to run databases that use SQL as the query language without managing infrastructure.
π§ Key Featuresβ
| Feature | Description |
|---|---|
| Managed Service | AWS handles provisioning, patching, backups, and recovery. |
| Supported Engines | MySQL, PostgreSQL, MariaDB, Oracle, SQL Server. |
| High Availability | Multi-AZ deployments for automatic failover. |
| Scalability | Vertical (instance size) and horizontal (read replicas). |
| Backups | Automated continuous backups with Point-in-Time Restore. |
| Monitoring | CloudWatch metrics and dashboards for performance insight. |
| Storage | Backed by EBS volumes (gp2, gp3, or io1). |
| Access Restriction | No SSH access β AWS fully manages the OS layer. |
π§ Where RDS Fits in Cloud Architectureβ
So, when we say βWhere RDS fits in architecture,β weβre talking about how RDS is used inside a typical cloud application setup.
Most web applications follow a three-tier structure:
Tier 1 β Load Balancer (Front-end): This is what receives all incoming web traffic from users. The load balancer spreads requests evenly across multiple servers so no single server gets overloaded. Example: AWS Application Load Balancer (ALB).
Tier 2 β EC2 Instances (Application layer): These are the actual servers that run your application code β for example, a website backend, APIs, or business logic. When a user logs in or adds something to a cart, the EC2 instance processes that request and needs to read or save some data.
Tier 3 β RDS Database (Data layer): This is where all the structured data is stored β like users, orders, messages, or payments. Instead of each EC2 server storing data locally, they all connect to the same RDS database so they can share data consistently.

Why Use RDS Instead of a DB on EC2?β
| Task | On EC2 | On RDS |
|---|---|---|
| Database installation | Manual | Automated |
| OS patching | Manual | AWS-managed |
| Backups | Manual scripts | Automatic |
| High availability | Custom setup | Multi-AZ |
| Monitoring | Manual CloudWatch setup | Built-in |
| Maintenance | Manual | Scheduled maintenance window |
ποΈ Amazon RDS Deployment Optionsβ
Amazon RDS offers multiple deployment options to balance performance, availability, and cost:
- Read Replicas β Improve read scalability
- Multi-AZ β Provide high availability
- Multi-Region β Enable global disaster recovery
π 1. Read Replicasβ
- Scale the read workload of db, in other words it allows hr scaling.
- Can create upto 15 Read Replicas.
- Data is only written in main db.
π 2. Multi-AZβ
- Failover safe in case of AZ outage.
- Data is only read/written to the main database.
- Can only have I other AZ as failover.
π Read Replicas vs Multi-AZβ
| Feature | Read Replicas | Multi-AZ |
|---|---|---|
| Purpose | Scale read workload. | Provide failover and availability. |
| Replication Type | Asynchronous. | Synchronous. |
| Data Access | Only read operations allowed. | Main DB handles both reads and writes. |
| Failover Capability | Manual promotion to master if needed. | Automatic failover to standby instance. |
| Number of Replicas | Up to 5 Read Replicas per DB instance. | One standby in another AZ. |
| Use Case | Analytics, reporting, heavy read queries. | Critical production systems needing HA. |

π 3. Multi-Region Deploymentsβ
Multi-Region (Cross-Region Read Replicas)
| Feature | Description |
|---|---|
| Disaster Recovery | Maintain database availability if a full AWS region fails. |
| Performance | Provide low-latency reads for global users. |
| Replication | Asynchronous across regions (replication lag possible). |
| Cost | Additional charges for inter-region data transfer and replication. |

Summaryβ
- Read Replicas β Improve read performance and scalability.
- Multi-AZ β Ensure high availability and automatic failover.
- Multi-Region β Enable global reach and disaster recovery.
- Choose deployment type based on business continuity, performance, and cost needs.
02. Amazon Auroraβ
Amazon Aurora is a cloud-optimized, high-performance relational database built by AWS.
Itβs compatible with MySQL and PostgreSQL engines.
π Key Benefitsβ
| Feature | Description |
|---|---|
| Performance | Up to 5Γ faster than MySQL and 3Γ faster than PostgreSQL on RDS. |
| Scalable Storage | Auto-expands in 10 GB increments up to 128 TB. |
| Replication | Up to 15 read replicas supported. |
| Multi-AZ Support | For fault tolerance and high availability. |
| Fully Managed | No OS or database maintenance required. |
| Cost | ~20% higher than RDS, but more cost-efficient due to performance gains. |
π Aurora Serverlessβ
Aurora Serverless offers on-demand, auto-scaling database capacity.
| Feature | Description |
|---|---|
| Supported Engines | MySQL and PostgreSQL |
| Auto-Scaling | Scales automatically based on workload demand |
| No Capacity Planning | AWS manages compute provisioning |
| Pay per Second | Billing based on actual usage |
| Ideal Use Cases | Infrequent, unpredictable, or variable workloads |
Architecture Concept:
- Clients connect via a proxy fleet.
- Aurora automatically provisions database instances.
- All instances share the same distributed storage layer.
π Summaryβ
| Category | RDS | Aurora |
|---|---|---|
| Engine Support | MySQL, PostgreSQL, MariaDB, Oracle, SQL Server | MySQL, PostgreSQL |
| Performance | Standard | 3Γβ5Γ faster |
| Storage Scaling | Manual | Auto (10 GB to 128 TB) |
| Pricing | Lower | ~20% higher |
| Read Replicas | Up to 5 | Up to 15 |
| Serverless Option | β | β Available |
| Best For | Traditional managed databases | High-performance cloud-native apps |
π§© In short:
Use RDS for managed traditional SQL databases.
Use Aurora (or Aurora Serverless) when you need cloud-native performance, scalability, and automation.