← Learning Hub
Beginner

Databases: RDS and DynamoDB

RDS: relational databases

RDS runs databases such as MySQL, PostgreSQL and SQL Server for you. AWS handles setup, backups, updates and failover. Aurora is AWS's own faster MySQL/PostgreSQL-compatible engine.

Running a database yourself means installing it, taking backups, applying security updates, and handling failures at 3 am. RDS does these jobs for you, so your team can focus on the app. You still design the tables and write SQL (see the SQL course); AWS keeps the database server healthy.

  • Use it for data with tables and relations: users, orders, payments.
  • Multi-AZ keeps a standby copy in another zone for safety.
  • Read replicas spread read traffic across copies.

DynamoDB: NoSQL

DynamoDB is a key-value database with very fast, steady speed at any size. There are no servers to manage.

NoSQL databases like DynamoDB store items as flexible key-value records instead of fixed tables with joins. They're designed for massive scale - millions of requests per second - with steady speed. The trade-off is that you must design the data around the questions you'll ask, because complex queries and joins aren't available.

Example
# put one item into a "Products" table
aws dynamodb put-item --table-name Products \
  --item '{"id": {"S": "P101"}, "name": {"S": "Pen"}, "price": {"N": "20"}}'

# get it back by its key
aws dynamodb get-item --table-name Products --key '{"id": {"S": "P101"}}'
A simple rule: choose RDS when you need joins and complex queries, and DynamoDB for huge scale with simple lookups by key.
Key points
  • RDS runs managed relational databases (MySQL, PostgreSQL...).
  • Multi-AZ for safety, read replicas for read-heavy loads.
  • DynamoDB is serverless NoSQL for huge scale.
  • Choose by your data and queries.

📝 Test yourself

1. Which service runs MySQL or PostgreSQL for you?
2. DynamoDB is a ... database.
3. Fill in the RDS option that keeps a standby copy in another zone: