How to support transactions in dynamoDB with javascript aws-sdk?
<p>We have a microservice written in node.js &amp; we use dynamoDB for data storage. Value is stored in json format against key. In update service call, we fetch value for a key, update the json &amp; save it.</p>

<p>Recently, we came across a condition where 2 calls wanted to update the value of the same key. So first call read the value, then second call read the value, first call updated &amp; saved, then second updated &amp; saved the value (usual case of race condition), so in this case update by first call did not get reflected in DB.</p>

<p>To handle this, I researched a bit &amp; came to know about the transaction library of dynamoDB. But it seems that it is not yet in node-js sdk.</p>

<p>Also, I searched about versioning &amp; optimistic locking but again I did not find a support for this in node-js sdk.</p>

<p>Is there any update with this? If it's support is not going to come in near future in node-js sdk, what are the other options? What could be the best way to handle this issue?        </p>