ResourceInUseException aws resource_error ai_generated partial

An error occurred (ResourceInUseException) when calling the DescribeTable operation: Table is in ARCHIVING state and cannot be described

ID: aws/dynamodb-table-in-archiving-state

Also available as: JSON · Markdown · 中文
85%Fix Rate
80%Confidence
1Evidence
2024-01-10First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
dynamodb-2012-08-10 active
aws-cli/2.17.0 active

Root Cause

The DynamoDB table is being archived (e.g., via a backup or deletion process), and operations like DescribeTable are blocked until archiving completes.

generic

中文

DynamoDB 表正在被归档(例如,通过备份或删除过程),像 DescribeTable 这样的操作被阻止,直到归档完成。

Official Documentation

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/BackupInProgress.html

Workarounds

  1. 95% success Wait for the archiving process to complete. Monitor table status with `aws dynamodb wait table-exists --table-name mytable` or check CloudWatch events for backup completion.
    Wait for the archiving process to complete. Monitor table status with `aws dynamodb wait table-exists --table-name mytable` or check CloudWatch events for backup completion.
  2. 60% success If archiving is taking too long, contact AWS Support to expedite or cancel the operation, as it may be stuck due to large table size or throttling.
    If archiving is taking too long, contact AWS Support to expedite or cancel the operation, as it may be stuck due to large table size or throttling.
  3. 70% success Use DynamoDB Streams to capture changes before archiving begins; after archiving completes, recreate the table and replay changes.
    Use DynamoDB Streams to capture changes before archiving begins; after archiving completes, recreate the table and replay changes.

中文步骤

  1. 等待归档过程完成。使用 `aws dynamodb wait table-exists --table-name mytable` 监控表状态,或检查 CloudWatch 事件以了解备份完成情况。
  2. 如果归档时间过长,请联系 AWS Support 以加速或取消操作,因为可能由于表过大或节流而卡住。
  3. 在归档开始前使用 DynamoDB Streams 捕获更改;归档完成后,重新创建表并重放更改。

Dead Ends

Common approaches that don't work:

  1. Force delete the table using `aws dynamodb delete-table` 85% fail

    If the table is in ARCHIVING state, it is already being deleted or backed up; delete-table will fail with the same error.

  2. Restore the table from a backup while it is archiving 90% fail

    Restore operations require the table to be in ACTIVE state; archiving blocks both reads and writes.