> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Inactive DynamoDB Tables

> Export and delete DynamoDB tables that nothing has read from or written to in 60 days.

A DynamoDB table keeps billing for its stored data, and for point-in-time recovery backups if they are on, even when no application uses it. nOps finds on-demand tables that had no reads or writes for 60 days and shows their storage cost as the saving.

| | |
| - | - |
| **Cloud** | AWS |
| **Category** | Database |
| **Service** | Amazon DynamoDB |
| **Action** | Delete |
| **Effort** | Low |
| **Restart needed** | No |
| **Can be rolled back** | No |
| **Analysis window** | Last 60 days |
| **Source** | nOps |

## Why it matters

Tables from old features, migrations and tests are rarely cleaned up, and their storage is billed every month.

## How nOps finds it

nOps reads the last 60 complete days of DynamoDB billing for each table. A table is flagged when its storage (or point-in-time recovery storage) was billed on at least 58 of those days and it had no on-demand read, write or replicated-write requests in that time. Tables with provisioned capacity are left out, because billing does not show whether they were used. The saving is the table's storage cost for the last 7 days, scaled to a month, and must be at least \$5.

## Before you start

Confirm with the owner that the table is not needed. Permission to back up, export and delete tables.

## How to implement

1. Confirm no rare job uses the table, such as quarterly reports or disaster recovery.
2. Keep a copy if you might need the data: export it to S3 (**DynamoDB console → Exports to S3**, needs point-in-time recovery) or take an on-demand backup.
3. Turn off deletion protection if it is on.
4. Delete the table (`aws dynamodb delete-table --table-name TABLE`).
5. Remove it from Terraform or CloudFormation so it is not recreated.

## Risks and considerations

* Deleting a table is permanent. Its point-in-time recovery history is lost with it.
* A table read only once a quarter can look inactive over 60 days.
* An on-demand backup or S3 export keeps costing storage, but less than the table.

## FAQs

> [accordion] Why are provisioned tables left out?
>
> Provisioned capacity is billed whether or not it is used, so billing cannot show whether anyone read or wrote the table.

## Related

* [Delete Inactive DocumentDB Clusters](https://help.nops.io/inform/supported-recommendations/delete-inactive-documentdb-clusters)
* [Switch DynamoDB Table to Standard-IA](https://help.nops.io/inform/supported-recommendations/switch-dynamodb-table-to-standard-ia)
* [Delete Unused Secrets Manager Secrets](https://help.nops.io/inform/supported-recommendations/delete-unused-secrets-manager-secrets)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.