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

    Key features: automated backups (point-in-time recovery up to 35 days), Multi-AZ deployments (synchronous replication to standby in different AZ for high availability), read replicas (asynchronous replication for read scaling), and encryption at rest (KMS).

    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