Stop 09 · Databases on AWSTopics · 5/11

Amazon Aurora

Part of the AWS Roadmap

In short

Aurora speaks MySQL or PostgreSQL, so your existing code works, but underneath it stores data very differently. That design gives faster failover, more read replicas and storage that grows by itself.

Aurora is AWS's MySQL- and PostgreSQL-compatible relational database with a distributed storage layer that keeps six copies of data across three Availability Zones. It supports up to 15 read replicas, fast failover, and an on-demand Aurora Serverless v2 option.

The jaadu sits at the head of a long table where several clerks read from one giant shared ledger whose pages fan out into three safe vaults behind them.

Think of it like this

One shared register, many clerks

In an old Kolkata bank, each branch kept its own ledger and copied entries to the others by hand. A modern bank keeps one central register in fireproof vaults across three buildings, and every clerk reads and writes the same register. If the head clerk falls ill, another clerk simply sits down and carries on. Aurora's shared storage is that register, and the writer and readers are the clerks.

Watch it happen

RDS for PostgreSQL vs Aurora PostgreSQL

RDS for PostgreSQL

  • Each instance has its own EBS storage
  • Replicas copy data over the network
  • Up to 15 read replicas, with more lag
  • Cheaper for small, steady workloads

Aurora PostgreSQL

  • One cluster volume, six copies in three AZs
  • Readers share the same storage, low lag
  • Up to 15 Aurora Replicas, fast failover
  • Storage grows automatically, Serverless v2 option

Pick Aurora when you need high availability, many readers or spiky load. Plain RDS is often enough, and cheaper, for a small app or a side project.

The big ideas

What you need to know

Cluster and instances

A cluster has one writer instance and up to 15 reader instances, all attached to the same cluster volume.

Endpoints

The cluster endpoint always points at the writer. The reader endpoint load-balances across readers. Use both in your app.

Fast failover

If the writer fails, Aurora promotes a reader, usually within about a minute or less, and the cluster endpoint follows it.

Serverless v2

Capacity is measured in Aurora Capacity Units and scales up and down in small steps between a minimum and maximum you set.

See it in code

Walk through the code

bash
1# 1. The cluster: engine, credentials, scaling range2aws rds create-db-cluster \3  --db-cluster-identifier shop-db \4  --engine aurora-postgresql \5  --master-username shopadmin \6  --manage-master-user-password \7  --db-subnet-group-name private-db-subnets \8  --vpc-security-group-ids sg-0db1234567890abcd \9  --serverless-v2-scaling-configuration MinCapacity=0.5,MaxCapacity=4 \10  --storage-encrypted11 12# 2. A writer instance inside that cluster13aws rds create-db-instance \14  --db-instance-identifier shop-db-writer \15  --db-cluster-identifier shop-db \16  --engine aurora-postgresql \17  --db-instance-class db.serverless

1/5Create the cluster with the PostgreSQL-compatible engine.

AWS CLI v2. Aurora needs two calls: one for the cluster (storage and settings) and one for each instance. Add a second db.serverless instance as a reader for high availability.

Save yourself the pain

Common mistakes

Oops

Sending every query, including reports, to the cluster endpoint.

Do this instead

Send writes to the cluster endpoint and read-heavy queries to the reader endpoint so the writer isn't overloaded.

Oops

Running a single-instance Aurora cluster in production and calling it highly available.

Do this instead

Storage is spread over three AZs, but compute is not. Add at least one reader in another AZ so failover has somewhere to go.

Your mission

Explore an Aurora cluster

~30 min

Quick check

Your app's dashboards are slowing down writes. What's the simplest Aurora fix?

Go deeper

  1. 1Read how Aurora's cluster, writer and reader endpoints work.
  2. 2Compare Aurora and standard RDS for a growing app in a short note.
  3. 3Learn when Aurora Serverless v2 makes sense, such as variable or unpredictable workloads.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge