Backfill a DynamoDB Global Secondary Index and manage on-demand capacity during creation

domain: aws-dynamodb · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Design the GSI key schema before issuing CreateTable or UpdateTable — once created, a GSI's key attributes cannot be changed; new GSIs can be added but cannot be removed and re-added atomically
  2. To add a GSI to an existing table: aws dynamodb update-table --table-name Orders --attribute-definitions ... --global-secondary-index-updates '[{"Create":{...}}]'; DynamoDB begins an asynchronous backfill
  3. Monitor GSI backfill progress via describe-table: check GlobalSecondaryIndexes[].IndexStatus (CREATING → BACKFILLING → ACTIVE) and ProvisionedThroughput.NumberOfDecreasesToday
  4. For provisioned-capacity tables, temporarily increase both the table's write capacity and the GSI's write capacity before initiating the backfill to avoid throttling; set auto scaling policies to adjust capacity as the backfill drives write traffic to the GSI
  5. For on-demand tables, DynamoDB also creates the GSI in on-demand mode and scales automatically — no manual capacity adjustment is needed but the table is subject to per-account and per-table throughput limits
  6. After the GSI reaches ACTIVE status, update queries and scans to use the new index; validate results against the base table for consistency

Known gotchas

Related routes

Implement DynamoDB GSI overloading with sparse indexes to support multiple access patterns on a single-table design
docs.aws.amazon.com/amazondynamodb/latest/developerguide · 6 steps · unrated
Bulk index documents into OpenSearch or Elasticsearch efficiently while handling backpressure
opensearch · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans