Skip to main content

DynamoDB: Delete unused indexes

Difficulty: Medium

Description

We identified DynamoDB tables or Global Secondary Indexes (GSIs) that appear to be unused based on their read activity metrics. When an entire table is unused, the estimated savings can also include attached unused GSIs. Deleting these unused resources can reduce provisioned capacity and storage costs.


Selection Criteria

  • The DynamoDB table has no read activity, including on attached GSIs, OR the GSI itself has no read activity in the last 30 days

  • The resource still has estimated provisioned capacity or storage costs that can be removed

  • The estimated annualized savings exceed the minimum cost threshold of $10


Expected Saving

100% of the unused resource’s annualized costs (table or GSI), calculated as follows:

  • Storage savings: 100% of the storage allocated to the unused resource

    • Table: base table storage

    • GSI: index storage (based on projected attributes size)

  • Write savings: 100% of write capacity costs for the unused resource

    • Provisioned mode: based on ProvisionedWriteCapacityUnits metrics

    • On-Demand mode: based on ConsumedWriteCapacity

Saving varies depending on the resource size, capacity mode, and (for GSIs) projected attribute set.


Operational Impact

Table

Breaking change (application): YES — CRITICAL ⚠️

Deleting this table will immediately break any application queries that depend on it. Before proceeding, confirm with the development team that no production code references this table. This must be an explicit customer approval step.


GSI

Downtime (table): None — deleting a GSI does not interrupt read or write operations on the parent table. Other indexes remain unaffected.

Breaking change (application): YES — CRITICAL ⚠️

Deleting this GSI will immediately break any application queries that depend on it. Before proceeding, confirm with the development team that no production code references this GSI. This must be an explicit customer approval step.

Deletion is permanent: A deleted GSI cannot be restored. Recreating it requires a full reindex of the table, which can consume significant WCU and time, depending on table size.


References

Did this answer your question?