Thuta Learning
IntermediateDevOpsbeginner

RDS Basics (Relational Database Service)

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand RDS Basics (Relational Database Service) without any of the intimidation
  • Get comfortable running things yourself in the AWS CLI/Console
  • Be ready to apply this concept in a real project right away

Let's think about this for a second

You could install and run a database on an EC2 instance yourself — but OS patching, database software updates, backups, replication setup — all of that becomes your job to manage, and it takes time. RDS is a managed service where AWS handles all of that for you — just say 'I want this engine (MySQL/PostgreSQL), this size' and you'll have a database instance ready within a few minutes. Enable Multi-AZ deployment and if one AZ goes down, a standby replica automatically fails over for you (high availability).

Let's connect this to a real scenario

Your web app's backend server (EC2, sitting in a Private Subnet) connects to an RDS database (also in a Private Subnet) using a connection string (endpoint, username, password) — RDS's automatic backups (7 days by default) let you do point-in-time recovery (so you can restore if data gets corrupted).

Let's look at this together

bash
# Create an RDS PostgreSQL instance (Free Tier eligible: db.t3.micro)
aws rds create-db-instance \
  --db-instance-identifier tutorial-db \
  --db-instance-class db.t3.micro \
  --engine postgres \
  --master-username admin \
  --master-user-password 'ChangeMe123!' \
  --allocated-storage 20
You should see
$ aws rds describe-db-instances --db-instance-identifier tutorial-db --query 'DBInstances[].DBInstanceStatus'
["available"]

Try it in 5 minutes

Create a db.t3.micro (Free Tier eligible) RDS instance — once it's created, note down the endpoint, and after practicing, delete the instance (to avoid costs).

A quick word of caution

When you delete an RDS instance, it creates a final snapshot by default (so your data isn't lost) — double-check the snapshot option before deleting a production database.

Easy traps

  • Placing an RDS instance in a Public Subnet and making it publicly accessible — this exposes your database to direct attacks from the internet
  • Setting the master password to something weak or default — a production database needs a strong password (managed with Secrets Manager)

Now try it yourself

Create a db.t3.micro (Free Tier eligible) RDS instance — once it's created, note down the endpoint, and after practicing, delete the instance (to avoid costs).

You'll know it worked when: $ aws rds describe-db-instances --db-instance-identifier tutorial-db --query 'DBInstances[].DBInstanceStatus' ["available"]

RDS Basics (Relational Database Service) | Thuta Learning