Introduction
Choosing between AWS RDS and self-managed MySQL on EC2 is a decision that affects your budget, operational burden, and reliability for years. RDS simplifies database operations but comes at a premium. Self-managed MySQL gives you full control but demands engineering time for maintenance, patching, and disaster recovery.
This guide provides a transparent cost comparison across multiple dimensions to help you make an informed decision.
Baseline Configuration
We compare equivalent setups: a production MySQL database with 4 vCPUs, 16 GB RAM, 500 GB SSD storage, Multi-AZ for high availability, and automated daily backups with 7-day retention.
Compute Costs (Monthly, eu-west-1)
| Component | RDS (db.r6g.xlarge) | EC2 (r6g.xlarge x2) | |-----------|---------------------|----------------------| | Instance cost | $876 | $438 (primary + replica) | | Multi-AZ standby | Included | +$219 (manual replication) | | Compute total | $876 | $657 |
RDS Multi-AZ is a managed failover with automatic DNS switching. On EC2, you must configure replication, monitoring, and failover scripts yourself.
Storage Costs
| Component | RDS (gp3) | EC2 (gp3 EBS) | |-----------|-----------|---------------| | 500 GB primary | $46 | $46 | | Multi-AZ replica storage | Included | $46 | | Provisioned IOPS (3000) | Included in gp3 | Included in gp3 | | Storage total | $46 | $92 |
RDS includes replica storage in the Multi-AZ price. On EC2, you pay for each EBS volume separately.
Backup and Snapshot Costs
RDS automated backups (7-day retention):
- First backup: full snapshot (~500 GB)
- Subsequent: incremental
- Cost: ~$12/month for incremental storage
EC2 manual backups:
- EBS snapshots: ~$12/month
- Must script and schedule yourself
- Must verify restore procedures
Hidden Operational Costs
This is where the real difference lies. Self-managed MySQL requires:
- Patching: Security patches and minor version upgrades — 2-4 hours monthly
- Monitoring setup: Configuring Prometheus, Grafana, or CloudWatch dashboards — 8-16 hours initial, ongoing maintenance
- Failover testing: Quarterly disaster recovery drills — 4-8 hours per test
- Replication management: Monitoring lag, handling drift, rebuilding replicas — variable
- On-call burden: Someone must respond to database alerts at 3 AM
At an average DevOps engineer cost of $80/hour, even 10 hours per month of database administration adds $800 to the self-managed cost.
Total Cost of Ownership (Monthly)
| Category | RDS | Self-Managed | |----------|-----|--------------| | Compute | $876 | $657 | | Storage | $46 | $92 | | Backups | $12 | $12 | | Operations (10 hrs) | $0 | $800 | | Total | $934 | $1,561 |
When Self-Managed Makes Sense
Self-managed MySQL is justified when you need custom MySQL forks (Percona, MariaDB with specific plugins), require kernel-level tuning that RDS does not expose, or already have a dedicated DBA team with established automation.
For related infrastructure decisions, see our guide on Terraform best practices for AWS. Our cloud management service helps teams evaluate and optimize their database infrastructure costs.
For most teams, AWS RDS is the more cost-effective option once you factor in operational overhead. The managed service premium pays for itself in reduced engineering time, automated failover, and peace of mind. Only choose self-managed MySQL if you have specific technical requirements that RDS cannot meet.
Need help with this?
Our team handles this kind of work daily. Let us take care of your infrastructure.