Let's think about this for a second
RDS (from the Intermediate chapter) is a relational database (tables, schema, SQL queries) — DynamoDB, on the other hand, is a NoSQL database with no fixed schema required (each item can have different attributes). You do need to design your Primary Key (Partition Key, optional Sort Key) up front, but the rest of your attributes can stay flexible. DynamoDB auto-scales and can be accessed from a Lambda function with millisecond-level latency — it's the most commonly used database layer in serverless applications (Lambda + API Gateway + DynamoDB).
Let's connect this to a real scenario
Create a 'Users' DynamoDB table with `userId` as the Partition Key, and you can flexibly add attributes (name, email, or custom fields) per user — a Lambda function (from Advanced lesson 2) can use the DynamoDB SDK to run `PutItem`/`GetItem` operations with millisecond-level latency.
Let's look at this together
# Create a DynamoDB table with userId as the partition key
aws dynamodb create-table \
--table-name Users \
--attribute-definitions AttributeName=userId,AttributeType=S \
--key-schema AttributeName=userId,KeyType=HASH \
--billing-mode PAY_PER_REQUEST
# Insert an item
aws dynamodb put-item \
--table-name Users \
--item '{"userId": {"S": "user-1"}, "name": {"S": "Aye Aye"}}'$ aws dynamodb get-item --table-name Users --key '{"userId": {"S": "user-1"}}'
{"Item": {"userId": {"S": "user-1"}, "name": {"S": "Aye Aye"}}}Try it in 5 minutes
Create a 'Users' DynamoDB table and try putting/getting a couple of items — write two sentences on how this concept differs from the RDS lesson (Intermediate).
A quick word of caution
When designing a DynamoDB table, you need to decide your access patterns (what queries you'll be running) before choosing a Primary Key — unlike RDS, you can't just 'add an index later' as easily in NoSQL.