Free tool

DynamoDB Single-Table Design Tool

Enter your entities and how you need to read them — the planner suggests entity-prefixed PK/SK key templates, previews the item collections, and adds a GSI only where the base table can’t serve a pattern.

Entities
Access patterns
Suggested key schema
EntityPKSK
UserUSER#<userId>USER#<userId>
Order
in the User item collection
USER#<userId>ORDER#<orderDate>#<orderId>
GetItem · base tableGet User by ID
PK = USER#<userId> AND SK = USER#<userId>
Query · base tableList Order under User
PK = USER#<userId> AND begins_with(SK, 'ORDER#') ScanIndexForward: false
  • Sort keys compare as strings — store the sort attribute in a sortable format (ISO-8601 dates, zero-padded numbers).
Query · GSI1Find User by email
GSI1PK = USER#EMAIL#<email>
  • A GSI doesn’t enforce uniqueness — guard duplicates at write time with a condition expression on the base item.
Global secondary indexes
GSI1Indexes User items
GSI1PK = USER#EMAIL#<email> GSI1SK = USER#EMAIL#<email>
  • A GSI doesn’t enforce uniqueness — guard duplicates at write time with a condition expression on the base item.
Example items
EntityPKSKGSI1Attributes
UserUSER#user-1USER#user-1USER#EMAIL#user-1@example.com USER#EMAIL#user-1@example.comuserId: user-1, email: user-1@example.com
OrderUSER#user-1ORDER#2025-06-01#order-1orderId: order-1, orderDate: 2025-06-01, userId: user-1
OrderUSER#user-1ORDER#2025-06-02#order-2orderId: order-2, orderDate: 2025-06-02, userId: user-1
Table definition (CreateTable JSON)
{
  "TableName": "AppTable",
  "BillingMode": "PAY_PER_REQUEST",
  "AttributeDefinitions": [
    {
      "AttributeName": "PK",
      "AttributeType": "S"
    },
    {
      "AttributeName": "SK",
      "AttributeType": "S"
    },
    {
      "AttributeName": "GSI1PK",
      "AttributeType": "S"
    },
    {
      "AttributeName": "GSI1SK",
      "AttributeType": "S"
    }
  ],
  "KeySchema": [
    {
      "AttributeName": "PK",
      "KeyType": "HASH"
    },
    {
      "AttributeName": "SK",
      "KeyType": "RANGE"
    }
  ],
  "GlobalSecondaryIndexes": [
    {
      "IndexName": "GSI1",
      "KeySchema": [
        {
          "AttributeName": "GSI1PK",
          "KeyType": "HASH"
        },
        {
          "AttributeName": "GSI1SK",
          "KeyType": "RANGE"
        }
      ],
      "Projection": {
        "ProjectionType": "ALL"
      }
    }
  ]
}

Plain JSON for aws dynamodb create-table --cli-input-json — generic string-typed PK/SK attributes, GSIs projected ALL, On-Demand billing.

Cost hints
Read units per item (eventually consistent)
0.5 RCU
Write units per item
1 WCU
Monthly On-Demand estimate (us-east-1) — base table only
US$4.93
Including GSI write replication (×1)
US$8.21

Each GSI stores its own projected copy of every item, so one table write also consumes write capacity on each GSI. The estimate assumes full projection and uses the same 4 KB read / 1 KB write rounding as our pricing and item-size calculators.

From access patterns to a key schema

Single-table design starts from the reads, not the entities: instead of normalizing tables and joining at query time, you list every way the application needs to fetch data — get a user by ID, list a user’s orders newest-first, find an account by email — and shape the keys so each one is a single GetItem or Query. Every pattern the base table can’t answer costs you an index, and that trade should be visible before you create the table.

This planner makes the trade explicit. It applies the standard single-table rules deterministically — entity-prefixed composite keys, item collections for one-to-many patterns, inverted or attribute-scoped GSIs for the rest — and where a pattern can’t be served cleanly it says so instead of pretending. The example-items table shows how the resulting rows actually sit next to each other inside a partition.

The output is a plain CreateTable JSON document with generic string-typed key attributes — nothing tool-specific to unpick later — plus cost hints that reuse the exact 4 KB read / 1 KB write rounding our pricing and item-size calculators use.

New to the concepts, or unsure the approach fits your workload? Our single-table design guide explains the idea from first principles, and when NOT to use it covers the honest counter-cases. Once the schema is set, compose the actual request in the DynamoDB Query Builder or estimate the full monthly bill with the DynamoDB Pricing Calculator.

Frequently asked questions

What is single-table design in DynamoDB?

A modeling approach where all of an application’s entity types share one table with generic partition and sort key attributes (PK/SK). Related items share a partition key so a single Query fetches them together — the design is driven by your access patterns rather than by normalized entity shapes.

How does this planner decide the key design?

With fixed, published rules — deterministic, not generative. Every entity starts as the root of its own item collection with entity-prefixed keys; the first list-children pattern moves the child into its parent’s partition on a composite sort key; lookups by other attributes, second parents, and list-everything patterns become GSI suggestions; and a pattern the rules can’t serve cleanly is marked as unsupported instead of receiving a made-up design.

When does an access pattern need a global secondary index?

When the base table’s key layout can’t answer it: fetching a re-homed child by its own ID, listing the same items under a second parent, finding an item by a non-key attribute such as an email, or listing every item of one type. Each of those re-keys the same data, which only an index can do — the planner suggests one per key shape and reuses it across patterns that share the shape.

How do GSIs affect DynamoDB cost?

Every GSI maintains its own projected copy of the items it covers, so each table write also consumes write capacity on every GSI that projects the item, and storage is billed per copy. The cost card shows a base-table estimate and one with GSI write replication included, using the same 4 KB read / 1 KB write rounding as our pricing and item-size calculators.

Does the planner upload my data model anywhere?

No. The page is static and the design is computed entirely in your browser — entity names, ID attributes, and access patterns never reach a server. The only way a design leaves the page is the “Copy link” URL, which packs it into the link so sharing stays a deliberate act.

Work with DynamoDB without the Console

DynoTable is a fast desktop client for DynamoDB — browse tables, run SQL-style queries, and edit items locally.