With equal HA, MongoDB on EC2 is usually still cheaper on the infra bill, but the gap is much smaller than “single EC2 vs RDS”. The real difference is people’s time.
Matching RDS Multi-AZ requires:
A 3-node replica set across 3 AZs (RDS Multi-AZ is 2 instances).
- 3× EBS volumes.
- Cross-AZ replication traffic (~$0.01/GB each way).
- Backups: snapshots or S3, plus restore testing.
- Monitoring and alerting.
Rough example (m6g.large, 500 GB, monthly):
RDS Multi-AZ (RI) MongoDB 3-node (EC2 RI)
- Compute ~$200 ~$110–150
- Storage ~$115 ~$120
- Replication traffic included ~$10–50
- Backups included ~$25–50
- Infra total ~$315 ~$265–370
- Ops time minimal 0.25–0.5 engineer
These are illustrative; check prices for your region.
Bottom line: once HA is done properly, the infra saving is often only 10–30%. That can be wiped out by engineer time, an outage, or a bad restore. Self-hosting pays off at large scale with a team that’s strong on databases, not as a quick cost cut.