Drain and Delete a Table
A 3-step recipe with Amazon DynamoDB. We can help you get access.
Recipe · 3 steps
Drain and Delete a Table
with Amazon DynamoDB
Scan, batch-delete items, and then delete the table.
- Scan the table to collect the keys of the items that need to be removed before the table can be deleted.
- Batch-delete the scanned items to empty the table.
- Delete the now-empty table; the response reports DELETING status.
What you'll need to have ready
- tableName: The name of the table to drain and delete.
- projectionExpression: Projection expression limiting the Scan to key attributes.
- deleteRequestItems: The BatchWriteItem RequestItems map of table name to an array of DeleteRequest objects keyed by primary key.
For your developer
Arazzo workflow amazon-dynamodb:drain-and-delete-table, 3 operations: Scan → BatchWriteItem → DeleteTable. Specs on APIs.io.