๐ŸŒ
AWS
docs.aws.amazon.com โ€บ amazon dynamodb โ€บ developer guide โ€บ nosql workbench for dynamodb โ€บ building data models with nosql workbench
Building data models with NoSQL Workbench - Amazon DynamoDB
1 month ago - You can use the data modeler tool in NoSQL Workbench for Amazon DynamoDB to build new data models, or to design models based on existing data models that satisfy your application data access patterns.
๐ŸŒ
Amazonaws
rh-web-bucket.s3.amazonaws.com โ€บ index.html
DynamoDB Data Modeler
This utility creates a data model with one or more virtual Tables, allowing users to visualize how relational data might be stored and indexed in DynamoDB in order to help design efficient schema for your application. The tool is fully compatible with the NoSQL Workbench for DynamoDB, and models ...
Discussions

Dynamodb Data modeling
Hey there i am new at dynamoDB. I am a bit confused regarding 1 to Many relation and data duplication in dynamodDB. i have search in documentaion regarding data modeling there i found social media ... More on repost.aws
๐ŸŒ repost.aws
1
0
September 20, 2023
DynamoDB Single Table Deign: Simple Guide To Modeling & Querying On To Many Relationships. (Using Excel to plan out the queries)
One of the things that I hear about single table design is that you need to understand all your access patterns up front. But rarely do requirements come up front. Agile (putting aside the cargo cult) is often executed in a way that reacts to changing demands and this seems to be an admission of flawed requirements, or information that only comes later. With the extra cognitive load of planning a single table design I feel like itโ€™s going to optimise RCU at the cost of refactoring exercises down the track. But Iโ€™d be happy to understand opposing points of view. More on reddit.com
๐ŸŒ r/aws
12
66
October 3, 2022
nosql - Data modelling for dynamodb where entity has one to many and many to many relationships - Stack Overflow
While reviewing my answer, keep in mind that this is only one solution. DynamoDB gives you a ton of flexibility when defining your data model, which can be both a blessing and a curse! This answer is not meant to be the way to model these access patterns. Instead, it's one way that these access ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
DynamoDB IDE
Partiql is meh to begin with. You're better off writing scripts to work with your entities that use the actual apis for your access patterns. More on reddit.com
๐ŸŒ r/aws
23
34
February 27, 2023
People also ask

One tool for design, development, and deployment
NoSQL Workbench is designed to accelerate the process of building data models with a rich graphical user interface to visualize data and perform DynamoDB operations. You can directly connect NoSQL Workbench to DynamoDB Local for local development and testing, and commit your data models to Amazon DynamoDB tables in an AWS account when ready.
๐ŸŒ
aws.amazon.com
aws.amazon.com โ€บ databases โ€บ amazon dynamodb โ€บ nosql workbench
NoSQL Workbench for Amazon DynamoDB - A professional GUI client
Generate sample code in multiple languages
With a few steps, you can generate ready-to-run sample code in multiple languages to use in your application to perform DynamoDB API operations.
๐ŸŒ
aws.amazon.com
aws.amazon.com โ€บ databases โ€บ amazon dynamodb โ€บ nosql workbench
NoSQL Workbench for Amazon DynamoDB - A professional GUI client
๐ŸŒ
AWS
aws.amazon.com โ€บ blogs โ€บ database โ€บ introducing-the-amazon-dynamodb-data-modeling-mcp-tool
Introducing the Amazon DynamoDB data modeling MCP tool | Amazon Web Services
July 31, 2025 - To help you move faster with greater confidence, weโ€™re introducing a new DynamoDB data modeling tool, available as part of our DynamoDB Model Context Protocol (MCP) server. The DynamoDB MCP data modeling tool integrates with AI assistants that support MCP, providing a structured, ...
๐ŸŒ
Hackolade
hackolade.com โ€บ help โ€บ DynamoDB.html
DynamoDB
Hackolade was specially adapted to support the data modeling of DynamoDB tables including partition (hash) and sort (range) keys, supporting multiple regions as well. The application closely follows the terminology of the database.
๐ŸŒ
GitHub
github.com โ€บ alexdebrie โ€บ awesome-dynamodb
GitHub - alexdebrie/awesome-dynamodb: List of resources for learning about modeling, operating, and using Amazon DynamoDB ยท GitHub
Dynamode - An open-source strongly typed modeling tool for TypeScript projects. DynamoDB Read Stream - An open-source tool for reading data chunk by chunk.
Starred by 1.8K users
Forked by 144 users
Find elsewhere
๐ŸŒ
Amazon Web Services
aws.amazon.com โ€บ databases โ€บ amazon dynamodb โ€บ nosql workbench
NoSQL Workbench for Amazon DynamoDB - A professional GUI client
2 weeks ago - NoSQL Workbench for Amazon DynamoDB is unified visual tool that provides data modeling, data visualization, and query development features to help you design, create, query, and manage DynamoDB tables. It is a cross-platform client-side application for modern database development and operations ...
๐ŸŒ
Medium
joudwawad.medium.com โ€บ dynamodb-data-modeling-fundamentals-9cfdf7f4dcb6
DynamoDB Data Modeling Fundamentals | Medium
June 11, 2026 - Master DynamoDB data building blocks and data modeling! Learn key fundamentals, best practices, and design patterns for scalable NoSQL applications.
๐ŸŒ
DEV Community
dev.to โ€บ aws-builders โ€บ dynamodb-data-modeling-an-effective-way-to-start-22e9
DynamoDB Data Modeling: An Effective way to start... - DEV Community
January 22, 2024 - Flexibility: Attributes accommodate various data types, from simple strings and numbers to complex structures like lists or maps, offering flexibility in data representation. ... Schema-less Nature: DynamoDB operates on a schema-less or schema-flexible model, allowing each item in a table to have different attributes.
๐ŸŒ
DataCamp
datacamp.com โ€บ blog โ€บ data-modeling-tools
Top 19 Data Modeling Tools for 2026: Features & Use Cases | DataCamp
January 13, 2025 - Hackolade is a data modeling tool designed specifically for NoSQL and cloud databases. It provides a visual interface for designing schemas and managing databases like MongoDB, DynamoDB, and Couchbase.
๐ŸŒ
Aws-news
aws-news.com โ€บ article โ€บ 2025-11-20-accelerating-data-modeling-accuracy-with-the-amazon-dynamodb-data-model-validation-tool
Accelerating data modeling accuracy with the Amazon DynamoDB Data Model Validation Tool
November 20, 2025 - Amazon DynamoDB Data Model Validation Tool automatically tests generated data models against DynamoDB local, iteratively refining schemas until all access patt...
๐ŸŒ
Datasparc Inc.
datasparc.com โ€บ home โ€บ dbhawk blog โ€บ what are dynamodb tools?
What are DynamoDB Tools?
February 28, 2023 - Learn more about DBHawk, the web-based DynamoDB tool that serves as your centralized solution for data modeling, visualizing, and executing critical operations.
๐ŸŒ
Reddit
reddit.com โ€บ r/aws โ€บ dynamodb single table deign: simple guide to modeling & querying on to many relationships. (using excel to plan out the queries)
r/aws on Reddit: DynamoDB Single Table Deign: Simple Guide To Modeling & Querying On To Many Relationships. (Using Excel to plan out the queries)
October 3, 2022 - Good article, it's not often that this approach is explained clearly. I'd replace Excel by an AWS made tool called NoSQL Workbench ; it's dedicated to DynamoDB and allows you, among other things, to create "facets" (data access patterns) and add sample data so you can see the table either per facet or entirely.
๐ŸŒ
Medium
medium.com โ€บ @ratulsaha โ€บ how-to-model-amazon-dynamodb-databases-with-nosql-workbench-bdb1bdbb6fcc
How to model Amazon DynamoDB databases with NoSQL Workbench | by Ratul Saha | Medium
December 9, 2019 - AWS quietly launched NoSQL workbench for Amazon DynamoDB a few months ago. For a team that consistently comes up with memorable names for their software, this one was mouthful! It is a desktop tool ๐Ÿ˜ฒ (the first one from AWS?) that makes Step ...
๐ŸŒ
Caylent
trek10.com โ€บ blog โ€บ dynamodb-single-table-relational-modeling
From relational DB to single DynamoDB table
Explore the latest updates from Caylent, including industry trends, expert insights, company news, and more.
๐ŸŒ
Docker Hub
hub.docker.com โ€บ mcp โ€บ server โ€บ awslabs-dynamodb โ€บ tools
Amazon DynamoDB MCP Server | Docker MCP Catalog
Complete DynamoDB operations and table management. ... Couchbase is a distributed document database with a powerful search engine and in-built operational and analytical capabilities. A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
Top answer
1 of 1
13

You're off to a great start by thinking deeply about your access patterns and defining your entities (Posts, Users, Likes, etc). As you know, having a thorough understanding of your access patterns is critical to storing your data in DynamoDB.

While reviewing my answer, keep in mind that this is only one solution. DynamoDB gives you a ton of flexibility when defining your data model, which can be both a blessing and a curse! This answer is not meant to be the way to model these access patterns. Instead, it's one way that these access patterns can be implemented. Let's get into it!

I like to start by listing the entities we need to model, as well as the Primary key for each. Throughout this post, I'll be using composite primary keys, which are keys made up of a Partition Key (PK) and a Sort Key (SK). Let's start out with a blank table and fill it out as we go.

         Partition Key             Sort Key
User
Post
Tag

Users

Users are central to your application, so I'll start there.

Let's start by defining a User model that lets us identify a User by ID. I'll use the pattern USER#<user_id> for the PK and SK of the User entity.

This supports the following access patterns (examples in pseudocode for simplicity):

  1. Fetch User by ID
ddbClient.query(PK = USER#1, SK = USER#1)

I'll update the table with the new PK/SK pattern for Users

         Partition Key             Sort Key
User     USER#<user_id>           USER#<user_id>
Post
Tag

Posts

I'll start modeling Posts by focusing on the one-to-many relationship between Users and their Posts.

You have an access pattern to fetch All Posts by UserId, so I'll start by adding the Post model to the User partition. I'll do this by defining a PK of USER#<user_id> and an SK of POST#<post_id>.

This supports the following access patterns:

  1. Fetch User and all Posts
ddbClient.query(PK = USER#<user_id>)
  1. Fetch User Posts
ddbClient.query(PK = USER#<user_id>, SK begins_with "POST#")

You may wonder about the odd-looking Post IDs. When fetching Posts, you'll probably want to get the most recent Posts first. You also want to be able to uniquely identify Posts by ID. When you have this sort of requirement, you can use a KSUID as your unique identifier. Explaining KSUID's is a bit out of scope for your question, but know that they are unique and sortable by the time they were created. Since DynamoDB sorts results by the Sort Key, your query for a user's posts will automatically be sorted by creation date!

Updating the PK/SK patterns for your application, we now have

         Partition Key             Sort Key
User     USER#<user_id>           USER#<user_id>
Post     USER#<user_id>           POST#<post_id>
Tag

Tags

We have a few options on how to model the one-to-many relationship between Posts and Tags. You could include a list attribute on your Post item, which simply lists the number of tags on the item. This approach is perfectly fine. However, looking at your other access patterns, I'm going to take a different approach for now (it will be apparent why later).

I will model tags with a PK of POST#<post_id> and an SK of TAG#<tag_name>

Since Primary Keys are unique, modeling tags in this way will ensure that no Post is tagged with the same Tag twice. Additionally, it allows us to have an unbounded number of Tags on a Post.

Updating our PK/SK table for Tag, we have

         Partition Key             Sort Key
User     USER#<user_id>           USER#<user_id>
Post     USER#<user_id>           POST#<post_id>
Tag      POST#<post_id>           TAG#<tag_name>

At this point we've modeled Users, Posts and Tags. However, we've only addressed one of your four access patterns. Lets see how we can use secondary indexes to support your access patterns.

Note: You could also model Likes in the exact same way.

Defining A Secondary Index

Secondary indexes allow you to support additional access patterns within your data. Let's define a very simple secondary index and see how it supports your various access patterns.

I'm going to create a secondary index that swaps the PK/SK patterns in your base table. This pattern is called an inverted index, and would look like this:

All we've done here is swapped the PK/SK pattern of your base table, which has given us access to two additional access patterns:

  1. Fetch Post by ID
ddbClient.query(IndexName = InvertedIndex, PK = POST#<post_id>)
  1. Fetch Posts by Tag
ddbClient.query(IndexName = InvertedIndex, PK = TAG#<tag_name>)

Fetch All Posts by Public/Private status

You wanted to fetch posts by public/private status, as well as fetching all Posts. One way to fetch all Posts is to put them in a single partition. We can put the public/private status in the sort key to separate the public and private Posts.

To do this, I'll create two new attributes on the Post item: _type and publicPostId. These fields will serve as the PK/SK patterns for the secondary index I'm calling PostByStatus.

After doing this, your base table would look like this:

and your new secondary index would look like this

This secondary index would enable the following access patterns

  1. Fetch All Posts
ddbClient.query(IndexName = PostByStatus, PK = POST)
  1. Fetch All Private Posts
ddbClient.query(IndexName = PostByStatus, PK = POST, SK begins_with "PRIVATE#")
  1. Fetch All Public Posts
ddbClient.query(IndexName = PostByStatus, PK = POST, SK begins_with "PUBLIC#")

Remember, post ID's are KSUID's, so they will naturally be sorted in your results by the date the Post was made.

A Word on Hot Partitions

Storing all your Posts in a single partition will likely result in a hot partition as your application scales. One way to address this is by distributing your Post items across multiple partitions. How you do that is entirely up to you and specific to your application.

One strategy to avoid the single POST partition could involve grouping Posts by creation day/week/month/etc. For example, instead of using POST as your PK in the PostByStatus secondary index, you could use POSTS#<month>-<year> instead, which would look like this:

Your application would need to take this pattern into account when fetching Posts (e.g. start at the current month and go backwards until enough results are fetched), but you'd be spreading the load across multiple partitions.

Wrapping Up

I hope this exercise gives you some ideas on how to model your data to support specific access patterns. Data modeling in DynamoDB takes time to get right, and will likely require multiple iterations to make work for your specific application. It can be a steep learning curve, but the payoff is a solution that brings scale and speed to your application.