Sub topic 15
When to Consider Aurora Instead
This chapter assumes you have read the earlier chapters on standard RDS: DB instances, DB subnet groups, Multi-AZ, read replicas and backups. It also assumes you can read the AWS CLI. The goal is to help you decide whether a workload should stay on standard RDS or move to Amazon Aurora, and to show what changes if it does.
What Aurora is
Aurora is a database engine family inside the RDS service. You still use RDS APIs, subnet groups, security groups, parameter groups, KMS encryption, Performance Insights and maintenance windows. The difference is the architecture underneath.
Aurora comes in two compatibility flavors: Aurora MySQL and Aurora PostgreSQL. If you need Oracle, SQL Server, MariaDB or Db2, Aurora is not an option.
Standard RDS attaches an EBS volume to each instance. Each instance owns its storage, and replication between instances copies data from one volume to another. Aurora separates compute from storage:
- The cluster volume is a distributed storage layer shared by all instances in the cluster.
- The volume keeps six copies of your data across three Availability Zones.
- The volume grows automatically as data grows, so you do not set
--allocated-storage. - A cluster has one writer instance and up to 15 Aurora Replicas. Every instance reads from the same volume.
How the design changes behavior
Replicas share storage
A standard RDS read replica replays the source's changes onto its own disk, so lag can grow under heavy writes. An Aurora Replica reads the same volume as the writer. It only has to refresh its cache, so lag is usually in the tens of milliseconds. Adding a replica does not copy any data, so it is fast and does not slow the writer.
Failover promotes a reader
With Multi-AZ on standard RDS, a standby you cannot read from takes over after a failure. In Aurora, the cluster promotes one of the Aurora Replicas to writer. Each replica has a promotion tier from 0 to 15, and Aurora picks the lowest tier first. Your replicas serve read traffic and act as failover targets at once. If the cluster has no replicas, Aurora creates a new writer, which takes longer.
Backups are continuous
Aurora backs up the cluster volume continuously to S3. You choose a retention period of 1 to 35 days, and point-in-time restore works as it does on standard RDS. The backup process does not pause or slow the writer. Restores always produce a new cluster, as with standard RDS restores that produce a new instance.
Storage billing differs
You pay for the storage the cluster actually uses, not for a size you provisioned. Aurora Standard also bills per I/O request. Aurora I/O-Optimized removes the per-request charge in exchange for higher instance and storage prices. For an I/O-heavy workload, I/O-Optimized can be cheaper. For a light workload, Standard usually is.
Comparison with standard RDS
| Topic | Standard RDS (single instance or Multi-AZ) | Aurora |
|---|---|---|
| Engines | MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Db2 | Aurora MySQL and Aurora PostgreSQL only |
| Storage | EBS volume per instance, you choose size and type | Shared cluster volume, grows automatically |
| Read scaling | Up to 15 replicas on most engines, asynchronous, each with its own copy of the data | Up to 15 Aurora Replicas on shared storage |
| Failover | Multi-AZ standby, not readable in the classic setup | A replica is promoted, so it serves reads until then |
| Backups | Daily snapshot plus transaction logs | Continuous, no effect on the writer |
| Capacity model | Provisioned instance classes | Provisioned or Serverless v2 |
| Cross-Region | Cross-Region read replicas | Aurora Global Database |
| Pricing | Instance hours plus provisioned storage | Instance hours, used storage, and I/O unless I/O-Optimized |
Standard RDS also offers a Multi-AZ DB cluster deployment for MySQL and PostgreSQL. It has two readable standbys and uses local storage. It narrows some gaps with Aurora, so include it in your comparison if you only want readable standbys.
Creating an Aurora cluster
Aurora creation takes two steps because the cluster and its instances are separate resources. First create the cluster. This is where you set the engine, credentials, networking, encryption and backup retention. Then add instances to it.
aws rds create-db-cluster \
--db-cluster-identifier demo-aurora \
--engine aurora-postgresql \
--master-username appadmin \
--manage-master-user-password \
--db-subnet-group-name demo-subnets \
--vpc-security-group-ids sg-0123456789abcdef0 \
--storage-encrypted \
--backup-retention-period 7
aws rds create-db-instance \
--db-instance-identifier demo-aurora-writer \
--db-cluster-identifier demo-aurora \
--engine aurora-postgresql \
--db-instance-class db.t4g.medium
aws rds create-db-instance \
--db-instance-identifier demo-aurora-reader \
--db-cluster-identifier demo-aurora \
--engine aurora-postgresql \
--db-instance-class db.t4g.medium \
--promotion-tier 1The first instance you add to an empty cluster becomes the writer. Later instances become readers. Notice what is missing: --allocated-storage and --storage-type do not apply. Settings such as encryption and backup retention belong to the cluster, and instance-level settings such as instance class and promotion tier belong to the instance.
Aurora gives you separate endpoints, and your application should use them on purpose:
- The cluster endpoint always points to the current writer.
- The reader endpoint spreads connections across the readers.
- Each instance also has its own endpoint.
import boto3
rds = boto3.client("rds")
rds.get_waiter("db_instance_available").wait(
DBInstanceIdentifier="demo-aurora-writer"
)
cluster = rds.describe_db_clusters(DBClusterIdentifier="demo-aurora")["DBClusters"][0]
print("writer:", cluster["Endpoint"])
print("readers:", cluster["ReaderEndpoint"])
print("secret:", cluster["MasterUserSecret"]["SecretArn"])The reader endpoint balances connections, not queries. It resolves through DNS, so a long-lived connection pool stays pinned to whichever reader it first reached. Refresh pooled connections after a scaling event or failover.
Capacity options
Aurora offers provisioned instances, as standard RDS does, and Aurora Serverless v2. Serverless v2 uses the instance class db.serverless and scales in Aurora Capacity Units (ACUs) between a minimum and maximum you set on the cluster. It suits spiky or unpredictable load, and development databases that sit idle. You can mix provisioned and Serverless v2 instances in one cluster. For example, you can use a provisioned writer with Serverless v2 readers for bursts of read traffic.
Aurora Global Database replicates a cluster to other Regions with typical lag under a second, and lets you promote a secondary Region during a regional outage. Standard RDS offers cross-Region read replicas, but without the same storage-level replication.
Reasons to choose Aurora
Aurora is a good fit when:
- You need several readers with low replica lag and fast failover that does not waste a standby.
- Your data is large or grows unpredictably, and you do not want to manage storage size.
- Your load swings widely, so Serverless v2 would save money over a fixed instance.
- You need cross-Region disaster recovery with low lag.
- Your write workload is heavy enough that the storage layer's throughput matters.
Reasons to stay on standard RDS
Standard RDS is the better choice when:
- You need Oracle, SQL Server, MariaDB or Db2, or a feature only the community engine provides. Aurora PostgreSQL and Aurora MySQL are compatible but not identical to the community versions, and some extensions or versions arrive later.
- The workload is small and steady. A single
db.t4g.microor a small Multi-AZ instance is often cheaper than the smallest Aurora cluster with a replica. - You want to run the same engine version elsewhere, such as on a laptop or on-premises, with minimal differences.
- You want the simplest billing. Standard RDS has no per-I/O charge to estimate.
Gotchas when moving
- Parameter groups split in two. Aurora uses a DB cluster parameter group for cluster-wide settings and a DB parameter group for instance settings. A setting in the wrong group has no effect.
- No in-place conversion for most cases. You usually migrate. For RDS MySQL or PostgreSQL you can create an Aurora Read Replica of the instance or restore a snapshot into an Aurora cluster, then cut over.
- Test your connection handling. Applications that cache DNS or hold connections open will see errors during failover unless they reconnect.
- Clean up in order. You cannot delete a cluster that still has instances.
aws rds delete-db-instance --db-instance-identifier demo-aurora-reader
aws rds delete-db-instance --db-instance-identifier demo-aurora-writer
aws rds delete-db-cluster \
--db-cluster-identifier demo-aurora \
--skip-final-snapshotExercise
A team runs a PostgreSQL database on a Multi-AZ RDS instance. Reads now overload the primary, replicas lag during write bursts, and storage keeps needing resizes. They use only standard PostgreSQL features. Which option should they evaluate, and which two settings in the creation commands change compared with create-db-instance for standard RDS?
Show answer
They should evaluate Aurora PostgreSQL, because Aurora Replicas share the writer's storage (less lag), readers double as failover targets, and storage grows automatically. The creation flow changes in two ways: you run create-db-cluster first and add instances with --db-cluster-identifier, and you drop --allocated-storage and --storage-type because the cluster volume is managed for you. They should also check extension support and compare cost, including I/O charges, before migrating.