dynobase-icon
Dynobase

Question: How do you create an index in DynamoDB?

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Answer

Create a global secondary index (GSI) through the DynamoDB console, UpdateTable API or infrastructure as code. A local secondary index (LSI) can only be defined when the table is created; you cannot add one later.

Start with the query you need. Choose the GSI's partition and sort keys, attribute types and projection. KEYS_ONLY projects the keys, INCLUDE adds selected attributes, and ALL copies all attributes. Current GSIs also support multi-attribute keys; use a current SDK or tooling when configuring those.

For an existing table:

  1. Open the table's index-management view or prepare an UpdateTable request.
  2. Specify the GSI name, key schema and projection. On a provisioned table, configure sufficient index write capacity for backfill and ongoing writes.
  3. Create the index and monitor backfill progress, consumed capacity and throttling.
  4. Wait until the index is ACTIVE before querying it with IndexName.

GSI reads are eventually consistent. A GSI contains only items with the required index-key attributes, and key-type violations can affect indexing. Adding an index also adds storage and write costs.

Dynobase table management supports GSI creation and backfill monitoring. See GSI design and LSIs vs GSIs before selecting an index type.

Source: AWS GSI management.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.