Amazon RDS and Aurora
RDS engines, Multi-AZ and read replicas, Aurora storage and Global Database, backups, encryption, RDS Proxy, Blue/Green deployments and the exam traps.
Exam tasks: 2.2 and 2.5 (reliable, scalable data), 3.2, 4.2 (database migration targets), 4.3
The decision: is the problem availability, read scale, or recovery across Regions? RDS and Aurora have a different feature for each, and the exam rewards matching the feature to the problem.
Amazon RDS runs MySQL, MariaDB, PostgreSQL, Oracle, SQL Server and Db2 as managed instances. Aurora is AWS's cloud-native MySQL and PostgreSQL compatible engine, with storage shared across the cluster.
Read replicas vs Multi-AZ
| Multi-AZ (instance) | Multi-AZ DB cluster | Read replicas | |
|---|---|---|---|
| Purpose | Availability | Availability plus read scaling | Read scaling |
| Replication | Synchronous | Semi-synchronous | Asynchronous |
| Standby readable | No | Yes, two readable standbys | Yes |
| Failover | Automatic, DNS endpoint moves | Automatic, typically faster | Manual promotion |
| Cross-Region | No | No | Yes |
- Aurora is different: storage keeps six copies across three AZs regardless, replicas share that storage, and any replica can be the failover target (tiers set the order). Failover usually takes under a minute.
- A cross-Region read replica is a cheap DR option for RDS. For Aurora, Global Database is the better one.
Read replicas for high availability
A read replica doesn't fail over automatically, so it isn't an HA answer for RDS. And Multi-AZ instance standbys can't serve reads, so they don't fix a read bottleneck. Match the feature to the problem.
Aurora features
- Serverless v2 scales capacity in fine-grained ACUs within seconds, and can scale to zero when idle. Mix serverless and provisioned instances in one cluster, for example a provisioned writer with serverless readers.
- Global Database replicates storage to up to 10 secondary Regions, typically with under a second of lag. Managed switchover for planned moves, failover for a regional outage. Write forwarding lets apps in a secondary Region send writes that the primary executes.
- Cloning uses copy-on-write, so a clone of a multi-TB cluster is ready in minutes and costs only for changed pages. Good for test copies of production.
- Backtrack (Aurora MySQL) rewinds a cluster in place to a point in time, without a restore.
- Custom endpoints send analytics queries to a subset of larger replicas.
Exam signal
"Test environment with a copy of production, created quickly, minimal extra storage" means Aurora cloning. "Unpredictable, spiky or intermittent SQL workload" means Aurora Serverless v2.
Backups, encryption and security
| Topic | What to know |
|---|---|
| Automated backups | Daily snapshot plus transaction logs, retained 1 to 35 days, restore to any second in the window. Deleting the instance deletes them unless you keep them |
| Manual snapshots | Kept until you delete them. Share or copy across accounts and Regions |
| Restore | Always creates a new instance with a new endpoint. Update the application or the DNS name |
| Encryption | Chosen at creation with KMS. To encrypt an existing instance: snapshot, copy with encryption, restore |
| Replicas of encrypted sources | Are encrypted. A cross-Region replica needs a KMS key in the target Region |
| IAM database authentication | Short-lived tokens instead of passwords for MySQL and PostgreSQL |
| Secrets | Secrets Manager rotates the master password and the application reads the secret |
| Network | Place instances in private subnets, restrict with security groups, and use a DB subnet group across at least two AZs |
Encrypt in place
You cannot turn on encryption for a running unencrypted RDS instance. The standard answer is snapshot, encrypted copy, restore, then cut over, or a migration with DMS to a new encrypted instance.
Operating features
- RDS Proxy pools and shares connections, keeps connections open during failover so failover time drops, and fits Lambda and other bursty clients. Credentials come from Secrets Manager, and it can enforce IAM authentication.
- Storage autoscaling grows storage when free space runs low, up to a limit you set.
- Blue/Green Deployments create a synchronized staging copy for engine upgrades and schema changes, and switch over in about a minute with little downtime. It is the answer for a major version upgrade with minimal outage.
- RDS Custom gives OS and database access for Oracle and SQL Server workloads that need customization, such as legacy packaged applications.
- Performance Insights shows database load by wait event, and Enhanced Monitoring shows OS metrics.
- Aurora Serverless v2, cloning, Backtrack, zero-ETL integration with Redshift and the Data API are Aurora-only.
- Oracle and SQL Server licensing is either license included or bring your own license.
Scenarios
Read replicas serve reads asynchronously and are the feature built for scaling reads. A Multi-AZ instance standby cannot be queried, so adding standbys does not help. Turning Multi-AZ off removes availability and frees nothing useful, and backup retention does not affect query load.
Blue/Green Deployments build a synchronized green environment, let you upgrade and test it, and switch over in roughly a minute. An in-place upgrade takes the instance offline for the duration. A replica can be a path but adds work and a new endpoint, and storage autoscaling has nothing to do with versions.
Global Database replicates at the storage layer with typical lag under a second, and a secondary cluster can be promoted within minutes. Daily snapshots mean an RPO of hours. Nightly loads are far behind the target too.
Related
- Purpose-built databases: the decision tree across all engines.
- Database migration: DMS and SCT into RDS and Aurora.
- Backup automation: AWS Backup for RDS and Aurora.
Further reading
Amazon DynamoDB
Key design, capacity math, indexes, consistency, streams, global tables, backups and security for DynamoDB, with the limits the exam asks about.
Amazon ElastiCache
Valkey, Redis OSS and Memcached compared, replication and failover, Global Datastore, security, eviction and caching strategies.