Parth
Parth

Reputation: 1155

DynamoDB: Is setting ReturnValues to "ALL_NEW" a good practice while updating?

I have my database setup with DynamoDB. I want to update an item in a table and return the new values because the callback does some processing based on the new data. So, is it efficient to request for the new data in ReturnValues? Is this a good practice or is there something better I can do?

Upvotes: 2

Views: 2103

Answers (1)

Parth
Parth

Reputation: 1155

My bad! I should have read the API reference closely. I quote from the ReturnValues section of UpdateItem

There is no additional cost associated with requesting a return value aside from the small network and processing overhead of receiving a larger response. No Read Capacity Units are consumed.

That answers my question. Let's hope this answers somebody's similar question in the future.

Upvotes: 8

Related Questions