Question

In this dynamodb documentation it is stated that existing items can not be updated with batch writing. However, when I try it replaces new items. How can I prevent it to update already exists one?

Was it helpful?

Solution

As stated in the documentation if you re-put an item it replaces the old one.

Update item adds/changed attributes but doesn't remove other ones.

So basically what you are doing is replacing items and not updating them.

With batch write you can't put conditions on individual items thus you can't prevent it from updating.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top