RDS: Managed Databases
RDS (Relational Database Service) runs a managed database for you — PostgreSQL, MySQL, and others — handling the parts of running a database that have nothing to do with your actual application: patching, backups, failover, and storage scaling.
What "managed" saves you from doing
Running your own database on an EC2 instance means you're responsible for installing it, applying security patches, configuring backups, monitoring disk space, and setting up replication if you want high availability. RDS handles all of that as part of the service:
aws rds create-db-instance \ --db-instance-identifier my-app-db \ --db-instance-class db.t3.micro \ --engine postgres \ --master-username admin \ --master-user-password ******** \ --allocated-storage 20
{
"DBInstance": {
"DBInstanceIdentifier": "my-app-db",
"Engine": "postgres",
"DBInstanceStatus": "creating"
}
}Automated backups and Multi-AZ
RDS takes automated daily backups and lets you restore to any point within a retention window (up to 35 days) — useful when a bad migration or an accidental DELETE needs to be undone. Enabling Multi-AZ keeps a synchronized standby copy of your database in a different availability zone, which RDS automatically fails over to if the primary has a problem — with no application changes required.
Connecting from your application
An RDS instance normally lives in a private subnet, reachable only from resources inside the same VPC (like an EC2 instance or a Lambda function configured for VPC access) — not from the open internet, following the same private-subnet pattern from the VPC lesson.