I want to update an item in dynamodb using boto, and the way I do it, I need to get_item it first anyways, then I change the item and put it back, is there any difference, performance penalty or otherwise, to do it using update_item and not put.
I want to update an item in dynamodb using boto, and the way I
Share
I am not aware of any performance differences between the two. Anyway, with DynamoDB, you pay for guaranteed throughput.
This said,
UpdateItemallows you to edit only a specific subset of an item. Moreover, this is the only way to use atomic increments.If you have a very big Item and want to update a single small field then you should use UpdateItem instead so spare WriteCapacity. But this is the main usecase.