aws/aws-sdk-js

Add support for DynamoDB transactions

Closed this issue ยท 58 comments

The AWS-SDK for Java has support for transactions since 2013. Time to add it to JavaScript as well!

Thanks for the suggestion! We will look into this feature request for the JavaScript SDK.

Tamal commented

Can you also add transaction support in Golang?

@Tamal
For requests to the Go version of the SDK, please create an issue here:
https://github.com/aws/aws-sdk-go

hello Joyce, can we expect the transaction support in the javascript sdk anytime soon?

it's good the have.

Any update on this?
It is a must have to be able to handle user work flows...

Any update on this?

+1

+1

+1

+1

+1

gozup commented

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

@LiuJoyceC is there any update on prioritizing this issue? It would make life a lot easier for us :)

+1

Thank you for all the requests for this feature. We appreciate the feedback and are watching this thread. I don't have any updates yet, but will report here as soon as I do.

+1
๐Ÿ‘

nolde commented

+1

๐Ÿ‘

keego commented

+1 pretty pretty please

we need it to write to two DynamoDB tables. Alternative is have one Lambda call another, but this creates unneeded latency and ads costs.

@urbien I believe the lambda-based approach may be cheaper in terms of both cost and latency. According to the blog post linked to by the OP, writing to two tables in one transaction would require 18 sequential writes:

Transactional puts are more expensive (in terms of read and write capacity units). A put that does not contend with any other simultaneous puts can be expected to perform 7N + 4 writes as the original operation, where N is the number of requests in the transaction.

One solution I found was using meta data for items, lock the items related to the transactional queries and once all the queries are complete release the locks

udag commented

+1

+1

+1

+1

+1

+1

+1

This issue has been open for more than a year now , can we get an update maybe ?

+1

tl;dr Use a thumbs-up reaction instead of commenting +1/me too/etc. to show support for a Github ticket.

For those who may not be aware, the best way to show your support for a ticket on Github is to use the reactions feature. It is much easier for a project owner to query for popular tickets when that popularity is expressed through reactions. Commenting with +1 is less effective and sends an email to everyone subscribed to the ticket, thus motivating them to unsubscribe so they stop getting as many emails; when people unsubscribe from a ticket, the ticket gets less attention, less support, less help. So, in a sense, whenever you comment +1, you're actually decreasing support for that ticket. Also, it's much harder to find relevant information about a task/bug (for example, possible workarounds or updates from the project owners) when you have to scroll through a lot of +1 comments. Finally, every time you comment +1 on a ticket a puppy dies. So, if for no other reason, do it for the puppies; their lives are on the line:

maxresdefault

@trevorhreed +1, well said

I guess that all of us would appreciate to just get an update on this, just to be informed when/if you are tackling this !?!

+1

+1

Hey everyone, first off, thank you for your feedback.

We've discussed this internally and have decided not to include this feature directly as part of the AWS JavaScript SDK. We have forwarded all your feedback to the DynamoDB team, and ask that you also request support for this on their forums. If you create a feature request there I will happily forward that to them as well.

Why the hell not?

Why Java SDK support but JavaScript SDK not?

When can we expect good transaction management for JS SDK, or any other workaround avl?

While I respect the decision of the team to focus on other things, an explanation of why this was passed over internally would be nice to have. Is there a technical reason why this feature is less important in the JS SDK than in the Java SDK? Is there a different approach to atomic transactions that we as developers should be using?

It would be great for the DynamoDB team to include this support directly, but in the meantime, I just fail to see why the JS SDK should not strive for feature parity with the Java SDK (in this particular respect.)

Also, I haven't looked extensively at how this is implemented in Java, but would you be interested in a PR?

@tanzeelrana Your approach sounds like that's what's happening with the 7N + 4 write units the official transaction api requires.

Hello All!

DynamoDB Transactions are now available as of version 2.365.0.

Check out documentation on transactGetItems and transactWriteItems.

+1

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.