dynobase-icon
Dynobase

Error: DynamoDB Error All Attributes Must Be Indexed

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

All attributes must be indexed commonly comes from the Terraform AWS provider when an attribute block is not used by a table or secondary-index key. It does not mean every field stored in every item needs an index.

resource "aws_dynamodb_table" "orders" {
  name         = "Orders"
  billing_mode = "PAY_PER_REQUEST"
  hash_key     = "pk"
  range_key    = "sk"

  attribute {
    name = "pk"
    type = "S"
  }
  attribute {
    name = "sk"
    type = "S"
  }
}

Items in this table can contain status, amount and nested documents without declaring attribute blocks for them. Add definitions only for distinct key attributes used by the table, GSIs or LSIs. INCLUDE projection fields are not key definitions.

If a declared field really is an index key, inspect the rendered configuration: a dynamic block or false condition may have omitted the index. Match attribute names and types exactly. The corresponding AWS API field is AttributeDefinitions; adding indexes for every ordinary item field is not the fix.

See Terraform table definitions and the provider reference.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Changelog
/
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.