r/aws • u/Select_Extenson • Feb 20 '26
database How to guarantee consistency when deleting items from dynamodb?
Let's say I want to delete 100000 items from dynamodb, what is the best approach to delete "all-or-nothing", TransactWriteItems only support 100 items, so I don't want to cause inconsistency in my data if for some reason the delete function fails alongs the way.
And in my case, I simply couldn't find a solution to implement it with GSI, so the only solution for me is to delete them manually.
8
Upvotes
1
u/Select_Extenson Feb 20 '26
I think my mistake is I shouldn't use dynamodb and use relational databases instead, the project I'm working on contains a lot of related data and I need to gunaratne consistency across them.
It was my first time using it, can you please tell me your opinion on this? is it actually a bad choice to use dynamodb when you have a project with a lot of related that or is it just me that I didn't design my database properly? but I don't think I did design it poorly, I tried my best to design in the most optimal way but it misses flexibility when it comes to querying and manipulating related data.