Managed Databases
debt(d5/e5/b7/t5)
Closest to 'specialist tool catches it' (d5). The term's detection_hints.tools list includes aws-rds, pganalyze, and datadog — these are specialist monitoring and infrastructure tools that can detect misconfigurations like Single-AZ deployments, missing read replicas, or disabled backups. Standard linters won't catch these infrastructure-level concerns; they require cloud-specific tooling or manual infrastructure review.
Closest to 'touches multiple files / significant refactor in one component' (e5). The quick_fix suggests using RDS Multi-AZ, which sounds simple but migrating from EC2-hosted MySQL to RDS or reconfiguring from Single-AZ to Multi-AZ involves connection string changes across multiple application configs, potential downtime planning, security group adjustments, and VPC subnet configuration. Not a one-line fix, but also not architectural rework.
Closest to 'strong gravitational pull' (b7). Database choice is load-bearing infrastructure that applies across web and cli contexts per applies_to. Every query, every migration, every deployment is shaped by this choice. Connection pooling, failover handling, backup procedures, and performance tuning all flow from this decision. Moving from one managed database provider to another or to self-managed is a significant undertaking that shapes ongoing development.
Closest to 'notable trap' (t5). The misconception field explicitly states the trap: developers believe 'managed databases eliminate all operational concerns.' In reality, query optimisation, index management, connection pooling, capacity planning, and cost management remain developer responsibilities. This is a documented gotcha that most teams eventually learn through experience, but it catches newcomers to managed services.
Also Known As
TL;DR
Explanation
Managed databases handle: automated backups and point-in-time recovery, multi-AZ failover (typically < 60 second RTO), read replicas with one-click provisioning, automated minor version patching, and performance monitoring. Trade-offs: higher cost than self-managed EC2 databases, less control over configuration, and vendor lock-in to proprietary extensions. Best for: production workloads where DBAs are not available, compliance requirements for automated backups, and teams that want to focus on application development rather than database operations.
Common Misconception
Why It Matters
Common Mistakes
- No read replica for analytics queries — analytical queries on the primary cause latency spikes.
- Too small an instance — managed DBs cannot be over-provisioned easily; monitor and right-size.
- Not enabling automated backups with adequate retention — default 1-day retention is insufficient.
- Database in a public subnet — managed databases should be in private subnets, accessed via bastion or VPN.
Code Examples
// Self-managed MySQL on EC2 — operational burden:
// Manual nightly backup cron job (may fail silently)
// Manual security patching (deferred until critical)
// No automatic failover (2h RTO on instance failure)
// No read replica (analytics kills production performance)
// Monitoring: none
// AWS RDS MySQL — managed:
// Automated backups: enabled, 14-day retention
// Multi-AZ: yes — 30-second automatic failover
// Read replica: yes — route analytics to replica
// Auto minor version upgrades: enabled
// Enhanced monitoring: enabled
// Encryption at rest: enabled
// Private subnet only
// Cost: ~2x EC2 instance — worth it for most teams