Amazon RDS hosts managed relational databases—AWS handles patching, backups, and failover options. Engines include PostgreSQL, MySQL, MariaDB, Oracle, and SQL Server.
Why RDS over DIY on EC2
- Automated backups and point-in-time recovery
- Multi-AZ standby for high availability
- Read replicas for read scaling
- Security groups restrict network access
Your SQL skills transfer directly—especially PostgreSQL on RDS.
Connection pattern
# After creating RDS PostgreSQL in private subnet:
# psql from app EC2 in same VPC (never expose 5432 to 0.0.0.0/0)
psql -h mydb.abc123.us-east-1.rds.amazonaws.com -U dbadmin -d appdbUse Secrets Manager or Parameter Store for credentials—not hardcoded passwords in Django settings committed to Git.
List RDS instances
aws rds describe-db-instances \
--query 'DBInstances[].{Id:DBInstanceIdentifier,Engine:Engine,Status:DBInstanceStatus}' \
--output tablePractice: Use RDS and DynamoDB free tier where eligible. Delete sandbox databases when finished—storage and instance hours can incur charges.
Sandbox safety
Use strong generated passwords. Disable public accessibility for learning databases. Snapshot before schema experiments; delete test instances when done.
Important interview questions and answers
- Q: Multi-AZ RDS?
A: Synchronous standby in another AZ—automatic failover on primary failure. - Q: RDS vs installing Postgres on EC2?
A: RDS automates backups, patching, and HA; EC2 gives full OS control and manual ops.
Self-check
- Name two benefits of RDS over self-managed DB on EC2.
- Why keep RDS in a private subnet?
Tip: Disable public accessibility on RDS learning instances—connect from EC2 in same VPC.
Interview prep
- Multi-AZ?
Synchronous standby in another AZ with automatic failover on primary failure.
- Public RDS?
Avoid—place in private subnet; app tier connects internally.