Amazon RDS and Aurora: Managed Relational Databases
Running a database yourself means patching, backups, replication and failover. Amazon RDS does that for you so you focus on schema and queries.
RDS at a glance
| Item | Options |
|---|---|
| Engines | MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Aurora (MySQL/PostgreSQL compatible) |
| Instance class | db.t4g.micro (dev) … db.r7g.4xlarge (memory optimised) |
| Storage | gp3 / io2, auto-scaling storage |
| Connectivity | Inside a VPC, DB subnet group (≥ 2 AZs), security group allowing port 3306/5432 from the app tier only |
| Endpoint | DNS name you connect to – never an IP |
High availability vs scaling reads
flowchart LR
App[Application] -->|writes + reads| P[(Primary – AZ a)]
P -. synchronous replication .-> S[(Standby – AZ b)]
P -. asynchronous .-> R1[(Read replica 1)] & R2[(Read replica 2)]
App -->|read-only queries| R1 & R2
| Multi-AZ | Read replicas | |
|---|---|---|
| Goal | Availability – automatic failover | Performance – scale reads |
| Replication | Synchronous | Asynchronous |
| Readable? | Standby is not (classic Multi-AZ) | Yes |
| Failover | Automatic, endpoint DNS switches (~1–2 min) | Manual promotion |
| Cross-Region | No | Yes (also for DR) |
Backups
- Automated backups: daily snapshot + transaction logs → point-in-time restore (1–35 days).
- Manual snapshots: kept until you delete them; copy across Regions/accounts.
- Restores always create a new DB instance.
Security
- Private subnets only; no public accessibility in production.
- Security group: allow DB port only from the app servers’ security group.
- Encryption at rest with KMS (choose at creation), TLS in transit.
- Credentials in Secrets Manager with automatic rotation; or IAM database authentication.
- RDS Proxy pools connections – essential for Lambda and bursty apps.
Amazon Aurora
Aurora is AWS’s cloud-native engine compatible with MySQL and PostgreSQL:
- Storage is shared, auto-growing (to 128 TB) and keeps 6 copies across 3 AZs.
- Up to 15 low-lag Aurora Replicas; fast failover (~30 s).
- Aurora Serverless v2 scales capacity in fine steps; Global Database spans Regions.
Multi-AZ = high availability, Read replicas = read scaling. Keep databases private and connect only from the application tier.
When not RDS?
Key-value at massive scale or single-digit-ms latency with flexible schema → DynamoDB; caching → ElastiCache; analytics → Redshift.
Practise it
Virtual lab · Amazon Web Services · 45 min
Run a managed MySQL database on Amazon RDS: connect, query, snapshot and read replica
Create a private RDS for MySQL instance, discover why the first connection times out, fix the security group, build and query tables with the mysql client from CloudShell, take a snapshot and add a read-only read replica.
Quick revision
- RDS manages patching, backups and failover for relational engines.
- Multi-AZ = synchronous standby for HA; replicas = async read scaling.
- Point-in-time restore from automated backups; snapshots for long-term.
- Private subnets, SG from app tier, KMS encryption, Secrets Manager.
- Aurora: 6-way replicated storage, fast failover, Serverless v2.
Practise this topic
Hands-on virtual lab
Apply what you just read in a realistic, guided simulation. Free with a verified account.
Create a free account to track your progress and unlock virtual labs.