Database
    🗄️Database

    Amazon RDS

    Managed relational database service supporting MySQL, PostgreSQL, Oracle, SQL Server

    RDS is like hiring a database administrator who never sleeps, never takes vacation, and handles all the boring maintenance tasks. You want a MySQL or PostgreSQL database? RDS sets it up in minutes, handles backups automatically, applies security patches, and can even create read replicas for you. It's the difference between buying a car and maintaining it yourself versus leasing a car where the dealer handles all maintenance. You still control your data and queries, but AWS handles the infrastructure: server provisioning, OS patching, backup management, and high availability setup.

    RDS is a managed relational database service supporting six engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, and Amazon Aurora. RDS handles provisioning, patching, backup, recovery, and scaling.

    Key Capabilities

    • Supports six database engines: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, and Db2
    • Automated daily snapshots plus transaction log retention for point-in-time recovery to any second within the retention window
    • Multi-AZ deployment: synchronous standby in a second Availability Zone with automatic failover for high availability (standby does not serve reads)
    • Read Replicas: up to 15 replicas per instance for read scaling, including cross-region replicas for disaster recovery and geographic distribution
    • Performance Insights: query-level monitoring to identify slow queries and database bottlenecks
    • RDS Proxy: connection pooling layer that queues and reuses database connections, particularly valuable for Lambda and other serverless workloads

    Gotchas & Constraints

    Gotcha #1: Multi-AZ is for high availability, not read scaling; the standby replica doesn't serve traffic. Use read replicas for read scaling. Gotcha #2: RDS backups cause brief I/O suspension on single-AZ deployments; use Multi-AZ to avoid this. Constraints: Limited OS and database engine access (no SSH, limited configuration), maximum storage of 64TB (except Aurora), and maintenance windows require planning (minor version upgrades, patching).

    An e-commerce platform runs on RDS PostgreSQL with 2TB of product and order data. They configure Multi-AZ deployment for high availability: RDS maintains a synchronous standby in a different AZ. When the primary AZ experiences an outage, RDS automatically fails over to the standby in under 2 minutes with zero data loss. For read-heavy workloads (product searches, analytics), they create 3 read replicas in different AZs, distributing read traffic via Route 53 weighted routing. Automated backups run daily with 7-day retention, and they take manual snapshots before major deployments. When they need to upgrade from PostgreSQL 13 to 14, they create a read replica, promote it to standalone, test the application, then switch traffic, resulting in zero downtime upgrade. RDS handles all patching, backups, and monitoring via CloudWatch.

    Official AWS Documentation