Amazon RDS and Aurora Operations: Multi-AZ, Read Replicas, Backups, Parameter Groups, Maintenance and Failover
RDS Basics for Operators
- Managed engines: MySQL, MariaDB, PostgreSQL, Oracle, SQL Server, Db2, and Aurora (MySQL/PostgreSQL compatible)
- AWS manages hardware, OS patching, backups and failover. You manage schema, queries, parameters, security groups and sizing
- You cannot SSH to the host. Use parameter groups, logs, Enhanced Monitoring and Performance Insights
High Availability: Multi-AZ
| Option | How it works | Failover |
|---|---|---|
| Multi-AZ instance deployment | Synchronous standby in another AZ. Standby is not readable | Automatic, usually 60 to 120 seconds. The DNS endpoint flips to the standby |
| Multi-AZ DB cluster (MySQL/PostgreSQL) | One writer and two readable standbys in 3 AZs, semi-synchronous | Typically under 35 seconds, supports reads from standbys |
| Aurora | Shared storage replicated 6 copies across 3 AZs. Writer plus up to 15 replicas | Replica is promoted in about 30 seconds or less. Cluster endpoint follows the writer |
- Multi-AZ is for availability, not read scaling (instance mode) and not DR for a Region failure
- Failover triggers: AZ outage, instance failure, storage failure, OS patching, instance class change, manual reboot with failover
- Applications must reconnect and honor DNS TTL. Use the endpoint, never an IP address
bash
aws rds reboot-db-instance --db-instance-identifier prod-db --force-failover # test failover
aws rds describe-events --source-type db-instance --source-identifier prod-db --duration 120
aws rds modify-db-instance --db-instance-identifier prod-db --multi-az --apply-immediately
Read Replicas
| Topic | Notes |
|---|---|
| Purpose | Scale reads, offload reporting, cross-Region DR |
| Replication | Asynchronous, so replicas can lag. Monitor ReplicaLag |
| Limits | Up to 15 for MySQL/MariaDB/PostgreSQL (5 on some engines), Aurora 15 |
| Cross-Region | Supported for most engines. Encrypted replicas need a KMS key in the target Region |
| Promotion | Promote a replica to a standalone database (breaks replication). Use for DR or migration |
| Endpoints | Each replica has its own endpoint. Aurora has a reader endpoint that load-balances |
| Backups | Source must have automated backups enabled to create replicas |
Backups and Restore
| Type | Details |
|---|---|
| Automated backups | Daily snapshot in the backup window plus transaction logs every 5 minutes. Retention 0 to 35 days (0 turns off). Enables point-in-time restore (PITR). Deleted with the instance unless you retain them |
| Manual snapshots | You create them. Kept until you delete them, even after deleting the DB. Can be copied and shared |
| Restore | Always creates a new instance with a new endpoint. Update the app or rename |
| Backtrack (Aurora MySQL) | Rewind the cluster in place without restoring |
| Cloning (Aurora) | Fast, copy-on-write copy for tests |
| Export to S3 | Snapshot export as Parquet for analysis |
bash
aws rds create-db-snapshot --db-instance-identifier prod-db --db-snapshot-identifier prod-db-pre-release
aws rds restore-db-instance-to-point-in-time --source-db-instance-identifier prod-db --target-db-instance-identifier prod-db-restore --restore-time 2026-11-17T09:45:00Z
aws rds copy-db-snapshot --source-db-snapshot-identifier arn:aws:rds:ap-south-1:111111111111:snapshot:s1 --target-db-snapshot-identifier s1-dr --kms-key-id $KEY --region ap-southeast-1
aws rds modify-db-instance --db-instance-identifier prod-db --backup-retention-period 14 --preferred-backup-window 21:00-22:00 --apply-immediately
Exam favorite To restore an encrypted snapshot to another Region you must copy it with a KMS key of the target Region. To encrypt an unencrypted RDS instance, create a snapshot, copy it with encryption, and restore from the copy (you cannot encrypt in place).
Parameter Groups, Option Groups and Maintenance
- Parameter group: engine settings (
max_connections,innodb_buffer_pool_size,rds.force_ssl). Dynamic parameters apply immediately, static need a reboot. Default groups cannot be edited, so create a custom one - Option group: extra features (for example Oracle, SQL Server options)
- Maintenance window: weekly slot for minor engine patches and OS updates. Enable auto minor version upgrade. Major upgrades are your decision and need testing
- Pending maintenance: view with
describe-pending-maintenance-actionsand apply when convenient - For low-downtime changes use Blue/Green deployments: a staging copy is upgraded and tested, then switched over in about a minute
bash
aws rds create-db-parameter-group --db-parameter-group-name prod-mysql8 --db-parameter-group-family mysql8.0 --description prod
aws rds modify-db-parameter-group --db-parameter-group-name prod-mysql8 --parameters "ParameterName=max_connections,ParameterValue=500,ApplyMethod=pending-reboot"
aws rds describe-pending-maintenance-actions
aws rds create-blue-green-deployment --blue-green-deployment-name upgrade --source <arn> --target-engine-version 8.0.40
Storage and Capacity
- Storage autoscaling: set
MaxAllocatedStorageso RDS grows storage automatically when free space is low. Storage can only grow - Types: gp3, io1/io2 Provisioned IOPS (for steady heavy I/O). Aurora storage grows automatically to 128 TiB
- Modifying storage has a cooldown (about 6 hours) and may cause performance impact while optimizing
- Scale compute by changing instance class (brief downtime, use Multi-AZ so the standby is upgraded first). Aurora Serverless v2 scales capacity (ACUs) automatically
Connections and RDS Proxy
- Many Lambda functions or containers can exhaust
max_connections. RDS Proxy pools and shares connections, speeds failover (up to about 66 percent shorter) and supports IAM authentication and Secrets Manager - Place the DB in private subnets, allow access only from app security groups, and set publicly accessible = No
- Require TLS (
rds.force_ssl=1for PostgreSQL,require_secure_transportfor MySQL)
Security
- Encryption at rest with KMS (choose at creation). Also encrypts backups, replicas and snapshots
- IAM database authentication and Secrets Manager rotation for passwords (managed master password available)
- Security groups are the firewall. Use VPC endpoints for management APIs where needed
- Audit logging: parameter or option group (for example
pgaudit, MariaDB audit plugin) and publish logs to CloudWatch Logs
Monitoring
| Metric / tool | Why |
|---|---|
CPUUtilization, FreeableMemory, SwapUsage | Compute and memory pressure |
FreeStorageSpace | Alarm before it fills. A full disk stops writes |
DatabaseConnections | Near max_connections? |
ReadIOPS/WriteIOPS, ReadLatency/WriteLatency, DiskQueueDepth | Storage performance |
ReplicaLag / AuroraReplicaLag | Replica freshness |
BurstBalance (gp2) and CPU credits (t-class) | Burst exhaustion |
| Enhanced Monitoring | OS-level metrics every 1 to 60 seconds |
| Performance Insights | DB load by wait event, SQL and user. Find the slow query |
| Logs | Error, slow query, general. Publish to CloudWatch Logs |
| RDS events + SNS | Failover, maintenance, backup, low storage notices |
Common Problems
| Problem | Likely cause and fix |
|---|---|
| Cannot connect | Security group (port 3306/5432), subnet routing, public access setting, wrong endpoint, NACL, DNS, DB not available |
Too many connections | Raise max_connections (needs memory), pool connections, use RDS Proxy |
Storage full / storage-full status | Increase storage (turn on autoscaling), purge logs and binlogs, tune retention |
| High CPU | Find top SQL in Performance Insights, add indexes, scale up, add read replicas |
| Replica lag growing | Heavy writes or long transactions on source, undersized replica, network. Scale replica class |
| Failover took long | Large transactions to recover, DNS caching in the app, long TTL |
| Restore changed endpoint | Restore makes a new instance. Update connection strings or swap names |
Instance stuck incompatible-parameters | Fix the parameter and reboot |
Aurora Specials
- Aurora Global Database: one primary Region and up to 5 secondary Regions with storage-level replication (typically under 1 second lag), fast cross-Region failover for DR
- Aurora Serverless v2: scales ACUs for spiky workloads
- Custom endpoints group chosen replicas (for example analytics) and reader endpoint for general reads
- Fast failover tips: use cluster endpoint, keep DNS TTL short, use the AWS JDBC wrapper driver
Practice Tasks
- Create a Multi-AZ instance and run a forced failover while watching events
- Create a read replica, watch
ReplicaLag, then promote it - Run a point-in-time restore and compare data
- Create a custom parameter group, change a static parameter and reboot
- Set storage autoscaling and alarms for
FreeStorageSpace
Conclusion
For RDS know Multi-AZ (availability) vs read replicas (scale and DR), backups (35-day PITR, manual snapshots, restore to a new instance), parameter groups (static needs reboot), maintenance and Blue/Green, storage autoscaling, RDS Proxy for connection storms, encryption rules, and the key metrics, Performance Insights and events for troubleshooting.
Quick Summary: HA; read replicas; backups; parameter groups; storage; Proxy; security; monitoring; problems; Aurora.

