CargoMeister
CargoMeister

Reputation: 4299

Delete From DynamoDB Via Secondary Index

If I have an a list of items in a table, that are related to a master item in another table, and the identifier for the master items comes from the field in the first table, and it is indexed, is there a way to delete all those items with one call, rather than doing a query using the index, retrieving all the items, then looping through them one after another and deleting by the hashkey? We are using node.js.

Upvotes: 0

Views: 1126

Answers (1)

Uilton Dutra
Uilton Dutra

Reputation: 394

You can use BatchWriteItem to delete up to 25 items at once. But you still need to run a query before to retrieve the items you want to delete.

Upvotes: 2

Related Questions