DEV Community

Cover image for A Beginner’s Guide to AWS DynamoDB: Creating Your First Table
Mubarak
Mubarak

Posted on

A Beginner’s Guide to AWS DynamoDB: Creating Your First Table

If you’re just starting your cloud journey, you’ve probably come across Amazon DynamoDB.

It’s a fully managed NoSQL database service from AWS, designed for applications that need high performance at any scale.

But if you’re new, it might feel overwhelming.

Don’t worry — in this guide, we’ll walk step by step through creating your very first DynamoDB table and adding data to it.


What is Amazon DynamoDB?

Amazon DynamoDB is a serverless, NoSQL, fully managed database with single-digit millisecond performance at any scale.

DynamoDB addresses your needs to overcome scaling and operational complexities of relational databases. DynamoDB is purpose-built and optimized for operational workloads that require consistent performance at any scale. You don’t have to worry about servers, patches, or capacity planning — AWS handles it for you.

DynamoDB falls into the Non-Relational or NoSQL category, and its commonly used for Web and mobile applications, Real-time analytics, Gaming and IoT apps, and any use case requiring scalable, low-latency databases. Instead of storing your data in tables with rows and columns, its commonly represented as JSON code.

Prerequisites

Before you begin, make sure you have:

  • An AWS account (you can use the free tier).
  • Access to the AWS Management Console.
  • Basic familiarity with AWS navigation.

Let's get started and create our first table.


Step 1: Navigate to DynamoDB

1) Log in to the AWS Management Console.

2) In the search bar, type DynamoDB.

3) Click on the service to open it.


Step 2: Create Your First Table
Click Create table.

2) Enter a Table name — for example, Users. Then set the partition key to user_id (Type: String).

Leave other settings as default (for now). Then click Create table.

Congratulations 🎉 you’ve just created your first DynamoDB table!


Step 3: Add Items to the Table

Now let’s add some data. Firstly, you open the table you just created by clicking on (Users).

Secondly, go to the Items tab by clicking on explore table items.

Thirdly, as you can see we don't have any items at the moment, so we’ll click on "Create item."

We indicate the partition key for our “user_id,” so we'll input “1” as the value, and we can also add a new attribute to our items. In this example we’ll use “string” as the data type for our new attribute.

After we input the details, then we go ahead and click on "create item."

Go to the Items tab to see all stored data. You can see our created item in the image below as “Items returned,” such as country, first_name, last_name and state.

Now let's create another item; this second one will be "user_id 2". Input the details and data type, then click on "Create Item."

And as you can see below, we have two different items, and both have different values. The second one has an age but the first one doesn't, while the first one has a city, but the second one doesn't.


Step 4: Scan and Query Items
Go to the Items tab to see all stored data. Use the Scan option to fetch all items, or try a Query to find a user by UserId.

To retrieve the data we just added, click on Query and for the partition key value, enter the key. e.g, “1" and click run. You should see the item below.

Here is the result.

Now let's also try scanning. Click "Scan" and click "Run"; this will show you all items in the table. Remember, queries are more efficient because they use the primary key to locate items directly, while scans have to look through every item in the table.

Congratulations, that’s how you create a DynamoDB table and also add items.

In this beginner-friendly guide, you:

✅ Created your first DynamoDB table.

✅ Inserted items into the table.

✅ Learned how to scan and query data.

From here, you can explore more advanced DynamoDB features like secondary indexes, provisioned capacity, and integrating with AWS Lambda.

DynamoDB might look complex at first, but with practice, you’ll see how powerful it is for modern applications.


If you find this article helpful, stay tuned — I’ll be sharing more beginner-friendly guides on AWS, DevOps, and Cloud Engineering.

👉 Follow me here on [DEV.to] for more tutorials, and connect with me on X (Twitter) to see what I’m building and learning in real time.

Let’s grow our cloud skills together 🚀

Top comments (0)