What You Will Learn
Intermediate
- What RDS is and why it is useful
- Supported engines (PostgreSQL, MySQL, etc.)
- How to create and connect to an RDS database
RDS (Relational Database Service) provides managed relational databases. AWS handles backups, patching, scaling, and HA — you just use the database.
| Engine | Free tier | Use case |
|---|---|---|
| PostgreSQL | 750 hrs (12 mo) | Most features, JSON support |
| MySQL | 750 hrs (12 mo) | Popular, WordPress |
| MariaDB | 750 hrs (12 mo) | MySQL fork |
| SQL Server | No | Microsoft shops |
Why RDS is great
AWS handles: backups (daily), patches, scaling, Multi-AZ replication, automated failover. You focus on your schema, not DB administration.Terminalbash
# Create PostgreSQL RDS (CLI)
aws rds create-db-instance \
--db-instance-identifier mydb \
--db-instance-class db.t3.micro \
--engine postgres \
--master-username admin \
--master-user-password Secret123 \
--allocated-storage 20Practical Exercise
Go to RDS -> Databases -> Create
Choose PostgreSQL, t3.micro (free tier)
Set master password
Create a security group allowing port 5432 from your EC2
Connect:
psql -h ENDPOINT -U admin -d postgresKey Takeaways
- RDS = managed relational databases (PostgreSQL, MySQL, etc.).
- AWS handles backups, patches, scaling, HA.
- Free tier: 750 hrs/month for 12 months (t3.micro).
- Use security groups to control access — never expose to internet.
- Connect like any database:
psql -h endpoint -U user.
Comments
Comments
Post a Comment