AWS Certified Cloud Practitioner / Databases & Analytics

DynamoDB Hands On

πŸ§ͺ Hands-On: Your First DynamoDB Table

Create a DynamoDB table, add data, and see how it differs from a relational database.

You'll learn to:

  • πŸš€ Create a DynamoDB table

  • πŸ”‘ Set a partition key

  • πŸ“ Add items

  • ⚑ Experience DynamoDB's flexible NoSQL model

  • πŸ—‘οΈ Delete the table to avoid charges


🌍 The Scenario

You've joined a startup building a high-traffic mobile app gaining thousands of signups a minute. Instead of managing servers, you choose DynamoDB β€” AWS's serverless NoSQL database.

Your task: create a table, store some user data, and see how simple a serverless database is to use.

Let's go! πŸš€


🧠 Before You Begin

Unlike RDS, there's no server to set up:

  • βœ… Just create a table

  • βœ… AWS manages the infrastructure

  • βœ… Nothing to provision or manage

  • βœ… Scaling happens automatically

That's the serverless advantage β€” you focus on your data, AWS handles the rest.


⚠️ Cost Warning

DynamoDB has a generous Free Tier, but charges can still apply if your Free Tier has expired, you exceed limits, or you leave resources running.

πŸ’‘ Delete your table when done to avoid charges.


πŸš€ Step 1: Open the DynamoDB Console

From the AWS Management Console:

  1. Search for DynamoDB.

  2. Open the Amazon DynamoDB Console.

  3. From the navigation pane, click Tables.

  4. Click Create table.

Everything in DynamoDB lives inside a table β€” no server setup first, you just create what you need.


πŸš€ Step 2: Name and Partition Key

Table name: DemoTable

Every table needs a Partition Key. Enter: user_id β€” keep type String

πŸ’‘ The Partition Key uniquely identifies each item and is what DynamoDB uses to locate your data fast.

πŸ’‘ DynamoDB also supports Sort Keys, but they're outside the Cloud Practitioner exam scope β€” Partition Key only here.


πŸš€ Step 3: Leave the Default Settings

Leave the rest of the settings as default β€” plenty of advanced options exist, but the goal here is understanding the core concept, not every setting.

βœ… Leave all settings as their defaults.

Click Create Table


⏳ Step 4: Wait for the Table to Be Created

Once status shows Active, click the table name.

πŸ’‘ Notice: no server, instance, or storage volume to configure β€” just a table. That's serverless in action.


πŸš€ Step 5: View the Table Items

Click Explore table items (or View items) β€” you'll see 0 items returned, since the table is empty.

That's expected, Let's add some data.


πŸš€ Step 6: Create Your First Item

Click Create item and enter:

  • user_id = 1234 (Partition Key)

  • first_name = codeveda

  • last_name = e-learning

  • favorite_number = 1 (Number type)

  • Click Create Item.

πŸŽ‰ No database server, no storage config, no software install, no rigid schema β€” just a table and your data.


πŸš€ Step 7: Create a Second Item

Click Create Item and enter:

  • user_id = 45678

  • first_name = diya

  • Click Create Item.

πŸ€” Notice the Difference

Item 1 has first name, last name, and favorite number. Item 2 has only a first name β€” same table, different attributes, no problem.

πŸ’‘ DynamoDB doesn't require every item to share the same columns β€” each item's attributes can vary. That flexibility is a core NoSQL advantage.


πŸ“Š Comparing the Two Items

πŸ”‘ user_id

πŸ‘€ first_name

πŸ‘€ last_name

πŸ”’ favorite_number

1234

codeveda

e-learning

1

45678

diya

β€”

β€”

With RDS, you'd create related tables (Customers, Orders, Products) and join them with SQL. DynamoDB has no joins β€” data is generally designed to live in a single table, structured so your app gets everything it needs in one place. That's a key SQL vs NoSQL difference.


🎯 Why It's Powerful

This flexibility lets DynamoDB scale automatically, handle massive workloads, deliver extremely low latency, and store flexible data structures β€” ideal for modern cloud-native apps.


πŸŽ‰ Congratulations!

You've:

  • πŸš€ Created a DynamoDB table

  • πŸ”‘ Configured a Partition Key

  • πŸ“ Added items with varying attributes

  • 🧠 Seen how NoSQL differs from relational databases


🧹 Clean Up Your Resources

To avoid unnecessary charges, delete the table after completing the lab.

Return to Tables β†’ select your table β†’ Delete

Optionally delete associated CloudWatch alarms. Type delete, then click Delete Table.

  • Click: Delete Table


πŸŽ“ Summary

You learned how to:

  • πŸš€ Create a DynamoDB table

  • πŸ”‘ Configure a Partition Key

  • πŸ“ Insert items without a fixed schema

  • 🧠 Compare DynamoDB to relational databases

  • πŸ—‘οΈ Clean up resources safely


🎯 Exam Tips

  • ⚑ DynamoDB = serverless NoSQL database

  • πŸ”‘ Every table requires a Partition Key

  • πŸ“ Items in the same table don't need identical attributes

  • 🚫 No SQL joins between tables

  • 🌍 You create tables only β€” AWS manages the infrastructure

  • πŸ’‘ "Serverless NoSQL database, flexible schema, automatic scaling" β†’ DynamoDB