Aurora
Overview
Amazon Aurora is AWS's cloud-native relational database, compatible with MySQL and PostgreSQL. It was designed from the ground up to separate compute from storage: your database instances do the query processing, while a shared distributed storage layer keeps the data. AWS claims up to 5x the throughput of standard MySQL and 3x that of standard PostgreSQL, at roughly one-tenth the cost of commercial databases.
The storage layer is a cluster volume that automatically grows in 10 GiB increments up to 128 TiB and stores six copies of your data across three Availability Zones. It can tolerate the loss of two copies without affecting writes and three without affecting reads, and it heals itself continuously in the background. Because replicas share the same volume, they lag the primary by only milliseconds, and failover takes typically under 30 seconds.
Aurora adds features RDS lacks: up to 15 read replicas, Aurora Serverless v2 that scales capacity in fine-grained increments, Global Database for cross-Region disaster recovery with about one second of replication lag, fast cloning, and Backtrack to rewind a database without a restore.
Key Concepts
- Compute/storage separation: a cluster volume replicated 6 ways across 3 AZs, auto-growing to 128 TiB in 10 GiB chunks.
- Quorum: writes need 4 of 6 copies, reads need 3 of 6; storage self-heals, tolerating loss of an AZ plus one copy.
- One writer plus up to 15 Aurora Replicas sharing the same storage, with replica lag typically under 100 ms; replicas are failover targets.
- Endpoints: cluster (writer) endpoint, reader endpoint (load-balances replicas), instance endpoints and optional custom endpoints.
- Aurora Serverless v2 scales in ACU (Aurora Capacity Units) increments of 0.5 within a min/max range (including scale to zero when paused) in seconds without disconnecting clients.
- Aurora Global Database: one primary Region plus up to 5 secondary Regions, storage-level replication with under 1 second lag, RPO ~1 s, RTO under 1 minute on managed failover.
- Backtrack (MySQL) rewinds a cluster in place; database cloning uses copy-on-write for fast, cheap copies; continuous backup to S3 with PITR up to 35 days.
- Also: Parallel Query, Data API (HTTP SQL), zero-ETL integration with Redshift, I/O-Optimized pricing, and IAM, KMS and Secrets Manager integration.
Detailed Notes
Architecture
An Aurora DB cluster has one primary (writer) instance and zero to 15 Aurora Replicas, all attached to one cluster volume. Storage is distributed over hundreds of storage nodes in 10 GiB protection groups, each replicated to six nodes (two per AZ).
Writer <-- cluster endpoint Reader endpoint --> Replica 1..15
\ /
+------ shared cluster volume ------+
AZ-a (2 copies) AZ-b (2 copies) AZ-c (2 copies)
Only redo log records are sent to storage, not whole pages, which reduces network I/O and speeds recovery. Crash recovery is nearly instant because storage nodes replay logs in parallel.
Aurora vs RDS (standard engines)
| Aspect | RDS MySQL/PostgreSQL | Aurora |
|---|---|---|
| Storage | EBS, up to 64 TiB, provisioned | Auto-scaling to 128 TiB, shared, 6 copies |
| Read replicas | Up to 15, async, separate storage | Up to 15, shared storage, lag in ms |
| Failover | 60-120 s (Multi-AZ) | Typically under 30 s |
| Cross-Region | Cross-Region replica | Global Database, under 1 s lag |
| Serverless | No | Aurora Serverless v2 |
| Backtrack / clones | No | Yes (Backtrack for MySQL) |
| Cost | Lower for small/simple | Roughly 20% more per instance, often cheaper at scale |
Endpoints
| Endpoint | Behaviour |
|---|---|
| Cluster endpoint | Always points to the current writer; updates on failover |
| Reader endpoint | Connection-level load balancing across replicas |
| Custom endpoint | A chosen set of instances (e.g. large replicas for analytics) |
| Instance endpoint | A specific instance, for diagnostics |
Scaling options
- Aurora Replica auto scaling adds or removes replicas based on CPU or connections.
- Aurora Serverless v2 adjusts capacity between a minimum and maximum ACU (1 ACU is roughly 2 GiB of memory with matching CPU), perfect for unpredictable or multi-tenant loads. It supports Multi-AZ and read replicas, and can be mixed with provisioned instances in one cluster.
- Parallel Query pushes analytical filtering down to the storage layer for MySQL-compatible clusters.
High availability and disaster recovery
- Within a Region: if the writer fails, Aurora promotes the replica with the highest failover priority (tier 0-15). With no replicas, a new instance is created, which takes longer.
- Global Database: dedicated replication infrastructure copies storage to secondary Regions with under one second lag. Secondary clusters are read-only and serve low-latency local reads; write forwarding lets them send writes to the primary. On a Regional outage you promote a secondary (RTO typically under a minute).
- Backups are continuous and incremental in S3 with no performance impact; retention is 1-35 days, with PITR to the second. Backtrack (Aurora MySQL) rewinds in place, for example after a bad
DELETE, up to 72 hours.
Security
Encryption at rest with KMS is selected at cluster creation (replicas and snapshots inherit it); TLS in transit; IAM database authentication; credentials in Secrets Manager; private subnets with security groups. Cross-Region replicas of encrypted clusters need a KMS key in the destination Region.
aws rds create-db-cluster --db-cluster-identifier shop-aurora \
--engine aurora-postgresql --storage-encrypted \
--serverless-v2-scaling-configuration MinCapacity=0.5,MaxCapacity=16 \
--master-username admin --manage-master-user-password
aws rds create-db-instance --db-cluster-identifier shop-aurora \
--db-instance-identifier shop-aurora-1 \
--db-instance-class db.serverless --engine aurora-postgresql
Real World Example
Scenario — a global SaaS platform needs a relational database with fast regional failover.
The company's customer-facing application is read-heavy but has unpredictable traffic spikes around product launches. It must keep running if an entire Region fails.
The team moves from RDS MySQL to Aurora MySQL. The primary Region has a writer and three Aurora Replicas reached through the reader endpoint; replica auto scaling adds replicas when CPU exceeds 60%. The dev/test environment uses Aurora Serverless v2 so it scales to a minimum when idle. An Aurora Global Database replicates to Frankfurt and Singapore with under a second of lag, giving local low-latency reads for European and Asian users and a documented RTO of less than one minute for a Regional failover.
A bad migration script once deleted a table; the team used Backtrack to rewind 10 minutes in seconds rather than restoring from a snapshot.
Architecture Diagram
Writer and readers share a six-copy cluster volume across three AZs; a secondary Region receives storage-level replication.
- 1The application sends writes to the cluster endpoint, which always points to the current writer instance.
- 2The writer ships redo log records to the shared cluster volume, which stores six copies across three AZs (write quorum 4 of 6).
- 3Read traffic uses the reader endpoint, which load-balances across up to 15 Aurora Replicas with millisecond lag.
- 4Global Database replicates storage to a secondary Region; during a Regional outage it is promoted in about a minute.
Best Practices
- ✓Use the cluster endpoint for writes and the reader endpoint for reads so failovers and scaling are transparent to the application.
- ✓Create at least one Aurora Replica in a different AZ from the writer so failover takes seconds instead of minutes.
- ✓Use Aurora Serverless v2 for variable, unpredictable or dev/test workloads and provisioned instances for steady high load.
- ✓Choose Aurora Global Database (not manual replicas) for cross-Region DR and low-latency global reads.
- ✓Enable replica auto scaling and use custom endpoints to route analytics to larger replicas.
- ✓Use database cloning for fast test environments and Backtrack (MySQL) for quick recovery from human error.
- ✓Consider I/O-Optimized configuration when I/O charges exceed about 25% of the database bill.
- ✓Front Lambda-heavy workloads with RDS Proxy and use the Data API for simple serverless access without connection management.
Common Interview Questions
Exam Tips
SAA-C03 focus
- Aurora = 6 copies, 3 AZs, 10 GiB chunks, up to 128 TiB; compatible with MySQL and PostgreSQL only.
- Up to 15 replicas with ms lag and automatic failover (<30 s); RDS Multi-AZ failover is ~60-120 s.
- "Cross-Region read replicas with <1 s lag and fast DR" -> Aurora Global Database (up to 5 secondary Regions).
- "Unpredictable workload, minimal admin, scales automatically" -> Aurora Serverless v2.
- "Rewind the database to a point in time without restoring" -> Backtrack (Aurora MySQL). "Fast copy for testing" -> cloning.
- Writes -> cluster endpoint; reads -> reader endpoint. Custom endpoints target a subset of instances.
- Encrypted at creation only; replicas in other Regions need their own KMS key.
Finished this lesson?
0 of 64 lessons done · 0% of the course

