
Rds Aurora
- 3 installs
- 12 repo stars
- Updated June 8, 2026
- aws-samples/sample-claude-code-plugins-for-startups
rds-aurora is a Claude Code skill for Amazon RDS and Aurora database design, engine selection, high availability, and operations.
About
This skill gives Claude a deep dive into Amazon RDS and Aurora database design. It covers engine selection, instance sizing, high availability, read scaling, Aurora Serverless v2, security, and migration. A developer uses it when designing an RDS database, choosing between RDS and Aurora, or configuring failover and read replicas.
- Engine selection matrix across RDS, Aurora, and Aurora Serverless v2
- Aurora vs RDS storage, replication, and failover differences with numbers
- High-availability topologies, Serverless v2 ACU scaling, and migration via DMS
Rds Aurora by the numbers
- 3 all-time installs (skills.sh)
- Ranked #721 of 911 Databases skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
rds-aurora capabilities & compatibility
- Works with
- aws · postgres · mysql
- Use cases
- database · devops
What rds-aurora says it does
Deep-dive into Amazon RDS and Aurora database design, engine selection, high availability, and operations.
npx skills add https://github.com/aws-samples/sample-claude-code-plugins-for-startups --skill rds-auroraAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3 |
|---|---|
| repo stars | ★ 12 |
| Last updated | June 8, 2026 |
| Repository | aws-samples/sample-claude-code-plugins-for-startups ↗ |
What it does
Design an RDS or Aurora database: pick an engine and deployment model, plan HA and read scaling, and configure security.
Who is it for?
Developers designing relational databases on AWS who must choose between RDS and Aurora and plan HA and read scaling.
When should I use this skill?
The user asks to design an RDS database, choose between RDS and Aurora, configure Aurora Serverless, set up read replicas, or plan failover.
By the numbers
- Aurora storage: 6 copies across 3 AZs, auto-grows to 128 TB
- Aurora Serverless v2 scales in 0.5 ACU increments, 0.5 to 256 ACU
- Aurora failover typically <30 seconds
Files
Specialist guidance for Amazon RDS and Aurora. Covers engine selection, instance sizing, high availability, read scaling, security, migration, and operational best practices.
Process
1. Identify the workload characteristics: read/write ratio, latency requirements, data volume, connection count 2. Use the awsknowledge MCP tools (mcp__plugin_aws-dev-toolkit_awsknowledge__aws___search_documentation, mcp__plugin_aws-dev-toolkit_awsknowledge__aws___read_documentation, mcp__plugin_aws-dev-toolkit_awsknowledge__aws___recommend) to verify current RDS/Aurora limits, engine versions, and features 3. Select the appropriate engine and deployment model (RDS single-instance, RDS Multi-AZ, Aurora provisioned, Aurora Serverless v2) 4. Design the high availability and read scaling topology 5. Configure security (encryption, IAM auth, network isolation) 6. Recommend operational best practices (backups, monitoring, maintenance)
Engine Selection Decision Matrix
| Requirement | Recommendation | Why |
|---|---|---|
| MySQL/PostgreSQL, predictable workload, cost-sensitive | RDS for MySQL/PostgreSQL | Simpler, cheaper for small-medium workloads |
| MySQL/PostgreSQL, high availability, auto-scaling storage | Aurora (MySQL/PostgreSQL) | 6-way replicated storage, up to 128 TB auto-grow |
| Spiky or unpredictable traffic | Aurora Serverless v2 | Scales ACUs in 0.5 increments, optional scale-to-zero support |
| Oracle or SQL Server licensing | RDS for Oracle / SQL Server | Only option for these engines on managed AWS |
| Very small dev/test database | RDS with db.t4g.micro or Aurora Serverless v2 min 0.5 ACU | Lowest cost entry points |
| High write throughput, global | Aurora Global Database | Sub-second cross-region replication, write forwarding |
| Existing on-prem PostgreSQL migration | Aurora PostgreSQL + DMS | Wire-compatible, minimal app changes |
Aurora vs RDS — Key Differences
Storage Architecture
- RDS: EBS-backed (gp3 or io2), single-AZ storage unless Multi-AZ
- Aurora: Distributed storage layer, 6 copies across 3 AZs, auto-heals, auto-grows to 128 TB
- Aurora survives loss of 2 copies for writes, 3 for reads — without manual intervention
Replication
- RDS: Async read replicas (up to 15 for MySQL, 5 for PostgreSQL), separate storage per replica
- Aurora: Up to 15 read replicas sharing the same storage volume — replica lag typically <20ms, often <10ms
- Aurora replicas can be failover targets with no data loss (same storage)
Failover
- RDS Multi-AZ: 60-120 second failover to synchronous standby
- Aurora: Typically <30 second failover to a read replica (promoted in-place)
- Aurora supports failover priority tiers (0-15) to control which replica gets promoted
Cost Comparison
- Aurora instances cost ~20% more than equivalent RDS instances
- Aurora eliminates separate EBS costs — storage is included in the Aurora pricing model
- For read-heavy workloads, Aurora's shared storage makes replicas cheaper (no storage duplication)
- Aurora Serverless v2 can be more cost-effective for variable workloads than provisioned instances sitting idle
Aurora Serverless v2
- Scales in 0.5 ACU increments (1 ACU ≈ 2 GiB RAM + proportional CPU)
- Minimum: 0.5 ACU; Maximum: 256 ACU per instance
- Scales based on CPU, connections, and memory pressure — not request count
- Can mix Serverless v2 and provisioned instances in the same cluster
- Recommended pattern: Serverless v2 reader for variable read traffic, provisioned writer for consistent write load
When to Use Serverless v2
- Development and staging environments
- Applications with idle periods (nights, weekends)
- Spiky read workloads (reporting, batch queries)
- New applications where traffic patterns are unknown
When to Avoid Serverless v2
- Sustained high-throughput production writers — provisioned is cheaper at steady state
- Latency-sensitive workloads during scale-up (scaling from minimum takes seconds, not instant)
High Availability Configurations
RDS Multi-AZ (Instance)
- Synchronous standby in a different AZ — automatic failover
- Standby is not readable (unlike Aurora replicas)
- Use for: production databases that need simple HA without read scaling
RDS Multi-AZ (Cluster) — db.r6gd Only
- One writer + two readable standbys across 3 AZs
- Uses local NVMe + synchronous replication
- Sub-35-second failover
- Limited to specific instance classes
Aurora Multi-AZ
- Create at least one read replica in a different AZ for HA
- All replicas share storage, so failover has zero data loss
- For production: minimum 2 replicas across 2 AZs (writer + 2 readers = 3 AZs)
Aurora Global Database
- Cross-region replication with <1 second typical lag
- Managed RPO/RTO with automated failover
- Write forwarding lets readers in secondary regions redirect writes to the primary
- Use for: disaster recovery, low-latency global reads
RDS Proxy
- Fully managed connection pooler sitting between applications and the database
- Multiplexes thousands of application connections to a smaller pool of database connections
- Reduces failover time by maintaining open connections to standby
- Essential for Lambda → RDS/Aurora (Lambda creates many short-lived connections)
When to Use RDS Proxy
- Lambda functions connecting to RDS/Aurora (connection exhaustion risk)
- Applications with many short-lived connections
- Reducing failover disruption (proxy pins to new primary automatically)
When to Skip RDS Proxy
- Applications with persistent connection pools (like traditional app servers with HikariCP/pgBouncer)
- Workloads requiring session-level features (prepared statements, temp tables — proxy may pin connections)
Security
Encryption
- At rest: Enable at creation time (cannot be enabled later without snapshot-restore). Use AWS KMS CMK for key control.
- In transit: Enforce SSL via parameter group (
rds.force_ssl = 1for PostgreSQL,require_secure_transport = ONfor MySQL)
Network Isolation
- Deploy in private subnets only — never assign a public IP
- Use security groups to restrict ingress to application subnets
- Use VPC endpoints for API calls (
rdsandrds-dataendpoints)
Authentication
- IAM database authentication: Token-based, no passwords stored — good for Lambda and automated access
- Secrets Manager rotation: Automatic password rotation on a schedule — use for traditional username/password auth
- Kerberos/Active Directory: Available for SQL Server and Oracle via AWS Directory Service
Blue/Green Deployments
- Create a "green" copy of the production database with changes applied (engine upgrade, parameter changes, schema changes)
- RDS keeps the green environment in sync via logical replication
- Switchover takes ~1 minute with minimal downtime
- Automatic rollback if health checks fail
Supported Changes
- Major engine version upgrades
- Parameter group changes
- Schema changes on the green environment
- Instance class changes
Limitations
- Not available for Aurora Serverless v1 (v2 supported)
- Requires enough capacity for both environments during the transition
Backup and Recovery
Automated Backups
- Default retention: 7 days (configurable 0-35 days; 0 disables)
- Point-in-time recovery (PITR) to any second within the retention window
- Backups are stored in S3 (managed by AWS, not visible in your bucket)
Manual Snapshots
- Persist indefinitely until deleted
- Can be shared cross-account or copied cross-region
- Use for: pre-change safety nets, archival, cross-region DR
Aurora Backtrack (MySQL only)
- Rewind the database to a specific point in time without restore
- Operates on the same cluster — much faster than PITR
- Configure a backtrack window (up to 72 hours)
- Use for: recovering from bad queries, accidental deletes
Anti-Patterns
- Public subnets for databases. Never place RDS/Aurora in a public subnet. Use private subnets and access through application layer, VPN, or bastion.
- Default parameter groups. Always create custom parameter groups — default ones cannot be modified and make tuning impossible.
- Unencrypted instances. Encryption must be enabled at creation. Retrofitting requires snapshot → copy-encrypted → restore, which means downtime and new endpoints.
- Lambda without RDS Proxy. Lambda creates new connections per invocation. Without a connection pooler, concurrent Lambdas exhaust
max_connectionswithin seconds. - Single-AZ production databases. No HA means any AZ failure takes down the database until manual intervention.
- Oversized instances "just in case". Start with Performance Insights data, right-size based on actual db.load, not guesswork. Graviton (r7g) instances offer better price-performance.
- Ignoring storage IOPS limits. gp3 default is 3,000 IOPS — if the workload exceeds this, provision higher IOPS or move to io2 before hitting throttling.
- Manual password management. Use
--manage-master-user-password(Secrets Manager integration) or IAM authentication. Hardcoded passwords in application config are a security incident waiting to happen. - Not enabling deletion protection on production. A single
delete-db-instancecall without deletion protection can destroy the production database.
Migration Guidance
For migrating to RDS/Aurora, coordinate with the migration-advisor agent for full assessment workflows.
Common Migration Paths
- Self-managed MySQL/PostgreSQL → Aurora: Use AWS DMS for minimal-downtime migration with CDC
- Oracle/SQL Server → Aurora PostgreSQL: Use AWS SCT (Schema Conversion Tool) + DMS
- RDS MySQL → Aurora MySQL: Use snapshot restore (fastest) or create Aurora read replica of RDS instance then promote
Key Considerations
- Always run SCT assessment report before cross-engine migrations — it quantifies conversion effort
- Test with DMS validation tasks to verify data integrity post-migration
- Plan for endpoint changes — Aurora uses cluster endpoints (writer) and reader endpoints
Additional Resources
Reference Files
For detailed operational guidance, consult:
- `references/instance-sizing.md` — Instance family comparison, Graviton recommendations, memory-to-connections ratios, ACU sizing, storage types, and cost optimization patterns
- `references/parameter-tuning.md` — PostgreSQL and MySQL parameter recommendations, Aurora-specific parameters, and safe change procedures
- `references/monitoring-operations.md` — CloudWatch alarm thresholds, Performance Insights wait event analysis, Enhanced Monitoring, backup verification, failover testing, connection diagnostics, and common CLI commands
Related Skills
- `migration-advisor` (agent) — Full migration assessment workflows (DMS, SCT, migration waves)
- `cost-check` — Detailed cost analysis and Reserved Instance recommendations
- `security-review` — IAM, network, and encryption audit for database configurations
- `networking` — VPC design, subnet planning, and security group configuration
Output Format
When recommending a database design, include:
| Component | Choice | Rationale |
|---|---|---|
| Engine | Aurora PostgreSQL 16.4 | Wire-compatible, storage auto-scaling |
| Writer | db.r7g.xlarge (provisioned) | Consistent write load, 4 vCPU / 32 GiB |
| Reader(s) | db.serverless (Serverless v2, 1-16 ACU) | Variable read traffic |
| HA | Multi-AZ (writer + 2 readers across 3 AZs) | Production requirement |
| Proxy | RDS Proxy | Lambda consumers |
| Encryption | KMS CMK, force SSL | Compliance requirement |
Include estimated monthly cost range using the cost-check skill.
RDS/Aurora Instance Sizing Guide
Instance Family Selection
Graviton (ARM) — Default Recommendation
Graviton-based instances (r7g, r6g, m7g, t4g) offer ~20% better price-performance than Intel equivalents. Default to Graviton unless the workload requires x86-specific extensions.
| Family | Use Case | vCPU Range | Memory Range |
|---|---|---|---|
| db.r7g | Memory-optimized production (default choice) | 2-64 | 16-512 GiB |
| db.r6g | Previous-gen memory-optimized (still cost-effective) | 2-64 | 16-512 GiB |
| db.r7i | x86 memory-optimized (when Graviton incompatible) | 2-64 | 16-512 GiB |
| db.m7g | General purpose (balanced CPU/memory) | 2-64 | 8-256 GiB |
| db.t4g | Burstable, dev/test, small production | 2-8 | 4-32 GiB |
| db.x2g | Memory-intensive (large in-memory datasets) | 4-64 | 64-1024 GiB |
When to Use Each Family
- r7g (default): Most production OLTP workloads. Memory-heavy databases benefit from the 8:1 memory-to-vCPU ratio.
- m7g: Workloads that are CPU-bound rather than memory-bound. Lower memory-to-vCPU ratio (4:1) at lower cost.
- t4g: Development, staging, low-traffic production. Burstable CPU is fine when utilization is <40% average. Enable unlimited mode for production to avoid CPU throttling.
- x2g: Data warehousing workloads, very large working sets that must fit in buffer pool to avoid disk I/O.
Memory-to-Connections Ratios
PostgreSQL
Each PostgreSQL connection consumes approximately 5-10 MB of memory at baseline. Under heavy query load, connections can consume 50-200 MB each (work_mem allocations).
| Instance Size | Memory | Recommended max_connections | Notes |
|---|---|---|---|
| db.t4g.micro | 1 GiB | 25 | Dev/test only |
| db.t4g.medium | 4 GiB | 100 | Small production |
| db.r7g.large | 16 GiB | 200-400 | Standard production |
| db.r7g.xlarge | 32 GiB | 400-800 | Medium production |
| db.r7g.2xlarge | 64 GiB | 800-1500 | Large production |
| db.r7g.4xlarge | 128 GiB | 1500-3000 | Heavy production |
Rule of thumb: Reserve 25% of memory for shared_buffers, 10% for OS/overhead, and allocate remaining memory across max_connections assuming 10-20 MB per connection under load.
MySQL
MySQL connections are lighter (~1-5 MB each at baseline) but InnoDB buffer pool should claim 75% of memory.
| Instance Size | Memory | Recommended max_connections | Notes |
|---|---|---|---|
| db.t4g.micro | 1 GiB | 50 | Dev/test only |
| db.t4g.medium | 4 GiB | 150 | Small production |
| db.r7g.large | 16 GiB | 500-1000 | Standard production |
| db.r7g.xlarge | 32 GiB | 1000-2000 | Medium production |
| db.r7g.2xlarge | 64 GiB | 2000-4000 | Large production |
Rule of thumb: innodb_buffer_pool_size = 75% of memory. Remaining 25% for connections, temp tables, sort buffers, and OS.
Aurora Serverless v2 ACU Sizing
1 ACU = approximately 2 GiB RAM + proportional CPU + networking.
| Workload | Min ACU | Max ACU | Notes |
|---|---|---|---|
| Dev/test | 0.5 | 2 | Minimal cost, slow at minimum |
| Small production | 1 | 8 | Handles moderate traffic spikes |
| Medium production | 2 | 32 | Good for typical web apps |
| Large production (reader) | 4 | 64 | Heavy read workloads |
| Large production (writer) | 8 | 128 | Consider provisioned if sustained |
Sizing approach: Start with min=0.5, max=16 for new workloads. Monitor ServerlessDatabaseCapacity and ACUUtilization metrics for 2 weeks, then tighten the range. Set max ACU high enough that the database never throttles — it only costs more when it scales up.
Right-Sizing Process
1. Enable Performance Insights (free tier: 7-day retention) 2. Run production workload for at least 1 week 3. Check db.load — if average load < 1.0 and max load < vCPU count, the instance is oversized 4. Check FreeableMemory — if consistently >50% of total memory, consider downsizing 5. Check CPUUtilization — if average <30%, consider smaller instance or Graviton migration 6. For Aurora Serverless v2: check ServerlessDatabaseCapacity — if min ACU is never reached, lower it
Storage Sizing
RDS (EBS-Backed)
| Storage Type | IOPS | Throughput | Use Case |
|---|---|---|---|
| gp3 (default) | 3,000 baseline, up to 16,000 | 125 MiB/s baseline, up to 1,000 MiB/s | Most workloads |
| io2 Block Express | Up to 256,000 | Up to 4,000 MiB/s | I/O intensive, latency sensitive |
gp3 tips:
- Free IOPS/throughput increase: gp3 baseline is 3,000 IOPS / 125 MiB/s regardless of volume size
- Provision additional IOPS only when CloudWatch shows
VolumeReadOps+VolumeWriteOpsconsistently approaching 3,000/sec - Storage auto-scaling: enable and set max threshold to avoid running out of space
Aurora (Managed Storage)
- Storage auto-grows in 10 GiB increments up to 128 TiB
- No IOPS provisioning needed — Aurora handles I/O distribution
- I/O-Optimized cluster option: eliminates per-I/O charges for I/O-heavy workloads (>25% of database cost is I/O)
- Standard pricing includes I/O charges per million requests — suitable for most workloads
Cost Optimization Patterns
Reserved Instances
- 1-year all-upfront: ~30-40% savings over on-demand
- 3-year all-upfront: ~50-60% savings over on-demand
- Apply to the writer instance (always running); use Serverless v2 for variable readers
Graviton Migration
- Direct ~20% cost reduction with no application changes for most workloads
- MySQL and PostgreSQL are fully compatible
- Use blue/green deployment for zero-downtime migration from Intel to Graviton
Aurora I/O-Optimized vs Standard
- Calculate: if I/O costs > 25% of total Aurora bill, switch to I/O-Optimized
- I/O-Optimized eliminates per-I/O charges but increases instance and storage cost by ~30%
- Check with
cost-checkskill for specific workload analysis
RDS/Aurora Monitoring and Operations Reference
CloudWatch Metrics
Critical Metrics — Monitor with Alarms
| Metric | Alarm Threshold | Action |
|---|---|---|
CPUUtilization | >80% sustained 5 min | Scale up instance or optimize queries |
FreeableMemory | <10% of total memory | Scale up or reduce max_connections/work_mem |
DatabaseConnections | >80% of max_connections | Add RDS Proxy, increase limit, or fix connection leaks |
FreeStorageSpace (RDS) | <20% of allocated | Enable storage auto-scaling or increase allocated storage |
ReplicaLag | >1 second sustained | Writer overloaded, reader undersized, or network issue |
DiskQueueDepth (RDS) | >10 sustained | IOPS bottleneck — provision more IOPS or move to io2 |
SwapUsage | >0 for extended periods | Instance memory insufficient — scale up |
AuroraReplicaLagMaximum | >100ms sustained | Write pressure exceeding replica capacity |
Important Metrics — Review Weekly
| Metric | What to Look For | Notes |
|---|---|---|
ReadIOPS / WriteIOPS | Approaching provisioned IOPS limit | gp3 baseline is 3,000 IOPS |
ReadThroughput / WriteThroughput | Approaching throughput limit | gp3 baseline is 125 MiB/s |
ServerlessDatabaseCapacity | Min/max ACU utilization patterns | Right-size Serverless v2 scaling config |
ACUUtilization | Consistently >90% | Max ACU may be too low |
BufferCacheHitRatio | <95% | Working set exceeds buffer pool — scale up memory |
Deadlocks | Any occurrence | Investigate application transaction patterns |
LoginFailures | Spikes | Possible credential issues or brute-force attempts |
Performance Insights
Setup
- Enable at instance creation or via
modify-db-instance --enable-performance-insights - Free tier: 7 days retention (sufficient for most troubleshooting)
- Paid: up to 24 months retention ($0.068/vCPU/month) — use for trend analysis
Key Concepts
db.load: The average number of active sessions. Compare to vCPU count:
- db.load < vCPU count → database is not CPU-constrained
- db.load > vCPU count → queries are waiting (bottleneck)
- db.load >> vCPU count → significant contention, immediate action needed
Wait Events (what queries are waiting on):
| Wait Event | Engine | Meaning | Fix |
|---|---|---|---|
CPU | Both | Query is actively executing | Optimize query or scale up |
IO:DataFileRead | PostgreSQL | Reading from disk | Increase shared_buffers or scale up memory |
wait/io/table/sql/handler | MySQL | Table I/O wait | Add indexes, optimize queries |
Lock:Relation | PostgreSQL | Table lock contention | Reduce long transactions, check autovacuum |
wait/synch/mutex/innodb/... | MySQL | InnoDB mutex contention | Increase buffer pool instances |
LWLock:BufferMapping | PostgreSQL | Buffer pool contention | Scale up instance (more memory) |
Client:ClientRead | PostgreSQL | Waiting for client to send data | Application or network issue |
IO:XactSync | PostgreSQL | Waiting for WAL sync | Storage throughput limit (RDS only) |
Top SQL Analysis
1. Sort by db.load contribution to find the most resource-consuming queries 2. Check execution plan with EXPLAIN (ANALYZE, BUFFERS) for the top offenders 3. Look for sequential scans on large tables, nested loops with large row counts, and sort operations spilling to disk 4. Use pg_stat_statements (PostgreSQL) or performance_schema (MySQL) for aggregated query stats
Enhanced Monitoring
- Provides OS-level metrics at 1-60 second granularity
- Separate from CloudWatch metrics — requires an IAM role for the RDS instance
- Essential for distinguishing database issues from OS/instance issues
Key OS Metrics
| Metric | What to Look For |
|---|---|
| CPU per core | Uneven core utilization (single-threaded bottleneck) |
| Memory breakdown | Shared buffers vs free vs cached |
| Swap | Any swap activity indicates memory pressure |
| Disk I/O latency | >5ms average indicates storage bottleneck |
| Network throughput | Approaching instance network bandwidth limit |
Operational Procedures
Maintenance Windows
- Schedule during lowest-traffic period (review CloudWatch metrics to identify)
- Enable
auto_minor_version_upgradefor security patches - For major version upgrades: use blue/green deployments, never in-place on production
- Aurora: minor patches apply with zero-downtime patching (ZDP) when possible
Backup Verification
Quarterly backup verification procedure: 1. Restore from the latest automated backup to a test instance 2. Run application smoke tests against the restored instance 3. Verify point-in-time recovery (PITR) works by restoring to a specific timestamp 4. Document restore time — this is the actual RTO 5. Delete the test instance after verification
Connection Management
Diagnosing Connection Issues
-- PostgreSQL: active connections by state
SELECT state, count(*) FROM pg_stat_activity GROUP BY state;
-- PostgreSQL: long-running queries
SELECT pid, now() - pg_stat_activity.query_start AS duration, query, state
FROM pg_stat_activity
WHERE (now() - pg_stat_activity.query_start) > interval '5 minutes'
AND state != 'idle';
-- PostgreSQL: idle-in-transaction connections (lock holders)
SELECT pid, now() - xact_start AS xact_duration, query
FROM pg_stat_activity
WHERE state = 'idle in transaction'
AND (now() - xact_start) > interval '1 minute';-- MySQL: connection overview
SHOW STATUS LIKE 'Threads_%';
SHOW PROCESSLIST;
-- MySQL: long-running queries
SELECT * FROM information_schema.processlist
WHERE TIME > 300 AND COMMAND != 'Sleep';Connection Leak Prevention
- Set
idle_in_transaction_session_timeout(PostgreSQL) orwait_timeout(MySQL) to kill idle connections - Monitor
DatabaseConnectionsmetric trend — steady increase indicates a leak - Use RDS Proxy to absorb connection spikes and multiplex connections
Failover Testing
Quarterly failover drill: 1. Initiate failover via aws rds failover-db-cluster (Aurora) or aws rds reboot-db-instance --force-failover (RDS Multi-AZ) 2. Measure actual failover time (Aurora target: <30s, RDS Multi-AZ target: <120s) 3. Verify application reconnects without manual intervention 4. Check that monitoring alerts fired as expected 5. Document actual RTO for DR planning
Diagnostic CLI Commands
Resource creation and modification belong in IaC (CDK, CloudFormation, Terraform). Use the iac-scaffold skill for templates. The CLI commands below are for diagnostics, investigation, and operational procedures only.
# Describe cluster (endpoints, status, instances, engine version)
aws rds describe-db-clusters --db-cluster-identifier my-cluster
# Describe a specific instance (class, AZ, storage, parameter group)
aws rds describe-db-instances --db-instance-identifier my-instance
# List all instances in the account
aws rds describe-db-instances --query "DBInstances[].{ID:DBInstanceIdentifier,Class:DBInstanceClass,Engine:Engine,Status:DBInstanceStatus,AZ:AvailabilityZone}" --output table
# Check current parameter values
aws rds describe-db-parameters --db-parameter-group-name my-param-group \
--query "Parameters[?ParameterName=='max_connections']"
# List all parameter groups
aws rds describe-db-parameter-groups --query "DBParameterGroups[].{Name:DBParameterGroupName,Family:DBParameterGroupFamily}" --output table
# View pending maintenance actions
aws rds describe-pending-maintenance-actions
# List snapshots for a cluster
aws rds describe-db-cluster-snapshots --db-cluster-identifier my-cluster \
--query "DBClusterSnapshots[].{ID:DBClusterSnapshotIdentifier,Status:Status,Created:SnapshotCreateTime}" --output table
# Check events (last 24 hours)
aws rds describe-events --duration 1440 --source-type db-cluster
# View Performance Insights metrics (requires PI enabled)
aws pi get-resource-metrics \
--service-type RDS \
--identifier db-XXXXX \
--metric-queries '[{"Metric":"db.load.avg"}]' \
--start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ) \
--end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \
--period-in-seconds 60
# Initiate failover drill (Aurora) — use during planned DR testing
aws rds failover-db-cluster --db-cluster-identifier my-cluster
# Initiate failover drill (RDS Multi-AZ) — use during planned DR testing
aws rds reboot-db-instance --db-instance-identifier my-rds-instance --force-failoverRDS/Aurora Parameter Tuning Reference
Parameter Group Strategy
- Never modify the default parameter group — create a custom one
- Use separate parameter groups for writer and reader instances when tuning differs
- Aurora cluster parameter groups apply to all instances; instance parameter groups override per-instance
- Changes to static parameters require a reboot; dynamic parameters apply immediately
- Always test parameter changes in staging before production — use blue/green deployments for risky changes
PostgreSQL Parameters
Memory and Buffers
| Parameter | Recommended Value | Notes |
|---|---|---|
shared_buffers | 25% of instance memory | Aurora manages this automatically; only tune on RDS |
effective_cache_size | 75% of instance memory | Planner hint, does not allocate memory |
work_mem | 4-16 MB | Multiplied by max_connections x sorts per query; too high causes OOM |
maintenance_work_mem | 512 MB - 2 GB | For VACUUM, CREATE INDEX; can be higher since these run infrequently |
temp_buffers | 8 MB (default) | Per-session temp table memory; increase only if using many temp tables |
Connections and Logging
| Parameter | Recommended Value | Notes |
|---|---|---|
max_connections | Based on instance size (see instance-sizing.md) | Over-provisioning wastes memory; under-provisioning causes connection errors |
log_min_duration_statement | 1000 (ms) | Logs queries taking >1s; start here, tighten to 500ms or 200ms as needed |
log_statement | ddl | Log DDL changes for audit; all is too verbose for production |
log_lock_waits | on | Log when queries wait >deadlock_timeout for a lock |
idle_in_transaction_session_timeout | 60000 (ms) | Kill idle-in-transaction sessions after 60s to prevent lock accumulation |
Query Performance
| Parameter | Recommended Value | Notes |
|---|---|---|
random_page_cost | 1.1 (Aurora/SSD) or 1.5 (RDS gp3) | Default 4.0 is for spinning disk; too high discourages index scans |
effective_io_concurrency | 200 (Aurora/SSD) | Default 1 is too low for SSD/Aurora; allows parallel I/O during bitmap scans |
default_statistics_target | 100-500 | Higher = better query plans but slower ANALYZE; increase for skewed data distributions |
jit | off (default on in PG 12+) | JIT compilation adds latency to short queries; enable only for analytical workloads |
WAL and Checkpoints (RDS only — Aurora handles this)
| Parameter | Recommended Value | Notes |
|---|---|---|
wal_buffers | 64 MB | Default -1 auto-sizes to 1/32 of shared_buffers |
checkpoint_completion_target | 0.9 | Spread checkpoint writes over 90% of checkpoint interval |
max_wal_size | 4-8 GB | Controls checkpoint frequency; larger = less frequent but longer recovery |
Vacuum and Autovacuum
| Parameter | Recommended Value | Notes |
|---|---|---|
autovacuum_vacuum_scale_factor | 0.02-0.05 | Default 0.2 waits too long on large tables |
autovacuum_analyze_scale_factor | 0.01-0.05 | Keep statistics fresh |
autovacuum_max_workers | 5-10 | Default 3 may not keep up with heavy write workloads |
autovacuum_vacuum_cost_delay | 2-10 (ms) | Lower = more aggressive vacuum but more I/O impact |
autovacuum_naptime | 15-30 (seconds) | How often autovacuum checks for work; default 60s is fine for most workloads |
Transaction ID wraparound prevention: Monitor age(datfrozenxid) — if approaching 1 billion, autovacuum is not keeping up. Increase autovacuum_max_workers and lower autovacuum_vacuum_cost_delay.
MySQL Parameters
InnoDB Buffer Pool
| Parameter | Recommended Value | Notes |
|---|---|---|
innodb_buffer_pool_size | 75% of instance memory | Aurora auto-tunes this; only set on RDS |
innodb_buffer_pool_instances | 8-16 | Reduces contention on the buffer pool mutex; set to 8 for <64 GiB, 16 for larger |
innodb_buffer_pool_dump_at_shutdown | ON | Warm cache on restart |
innodb_buffer_pool_load_at_startup | ON | Pair with dump_at_shutdown |
Connections and Threads
| Parameter | Recommended Value | Notes |
|---|---|---|
max_connections | Based on instance size (see instance-sizing.md) | Each connection reserves ~1-5 MB |
thread_cache_size | 16-64 | Cache threads for reuse; avoids thread creation overhead |
innodb_thread_concurrency | 0 (auto) | Let InnoDB manage; only set if you observe thread contention |
wait_timeout | 300 (seconds) | Kill idle connections after 5 minutes |
interactive_timeout | 300 (seconds) | Same as wait_timeout for interactive sessions |
Logging and Slow Queries
| Parameter | Recommended Value | Notes |
|---|---|---|
slow_query_log | ON | Must be enabled to capture slow queries |
long_query_time | 1 (second) | Queries taking >1s are logged; tighten to 0.5s as needed |
log_queries_not_using_indexes | ON | Catch full table scans |
performance_schema | ON | Essential for troubleshooting; ~5% overhead |
general_log | OFF | Never enable in production — massive I/O and storage impact |
InnoDB I/O and Durability
| Parameter | Recommended Value | Notes |
|---|---|---|
innodb_io_capacity | 3000 (gp3) or 10000 (io2) | Match to provisioned IOPS |
innodb_io_capacity_max | 6000 (gp3) or 20000 (io2) | 2x of innodb_io_capacity |
innodb_flush_log_at_trx_commit | 1 (default) | Full ACID; set to 2 only for non-critical data where slight data loss on crash is acceptable |
sync_binlog | 1 (default) | Sync binary log on each commit; 0 is faster but risks data loss |
Replication (RDS Read Replicas)
| Parameter | Recommended Value | Notes |
|---|---|---|
binlog_format | ROW | Required for RDS replication; STATEMENT causes inconsistencies |
binlog_row_image | MINIMAL | Reduces replication traffic; only log changed columns |
replica_parallel_workers | 4-16 | Parallel replication on read replicas; reduces replica lag |
replica_preserve_commit_order | ON | Maintain commit order on replicas |
Aurora-Specific Parameters
Aurora manages many parameters automatically. Avoid overriding these unless there is a specific, measured need:
shared_buffers/innodb_buffer_pool_size— Aurora manages buffer allocation- WAL/redo log settings — Aurora's distributed storage handles this
- Checkpoint settings — Aurora's storage layer handles persistence
Aurora Parameters Worth Tuning
| Parameter | Engine | Recommended | Notes |
|---|---|---|---|
aurora_parallel_query | MySQL | ON for analytical queries | Offloads query processing to storage layer |
apg_plan_mgmt.use_plan_baselines | PostgreSQL | ON for plan stability | Aurora Query Plan Management prevents plan regressions |
rds.force_ssl | PostgreSQL | 1 | Enforce TLS for all connections |
require_secure_transport | MySQL | ON | Enforce TLS for all connections |
Applying Parameter Changes
Dynamic Parameters (No Reboot Required)
Apply immediately with modify-db-parameter-group or modify-db-cluster-parameter-group.
Common dynamic parameters: max_connections, work_mem, log_min_duration_statement, slow_query_log, long_query_time
Static Parameters (Reboot Required)
Change takes effect after the next reboot or during the maintenance window.
Common static parameters: shared_buffers, max_worker_processes, innodb_buffer_pool_size
Safe Change Process
1. Change parameters in staging, monitor for 24-48 hours 2. For production: use blue/green deployment for static parameters to minimize downtime 3. For dynamic parameters: apply during low-traffic periods and monitor immediately 4. Always record parameter changes and rationale — use parameter group descriptions or tags
Related skills
FAQ
When should I choose Aurora over RDS?
The skill recommends Aurora for MySQL/PostgreSQL needing high availability and auto-scaling storage, citing 6-way replicated storage and up to 128 TB auto-grow.
When should I avoid Aurora Serverless v2?
The skill says avoid it for sustained high-throughput production writers, where provisioned is cheaper at steady state, and for latency-sensitive workloads during scale-up.