awslabs/dynamodb-transactions

Please Please Please Support Requests with Conditions

LeoTheMighty opened this issue · 2 comments

I got through most of my project before I found out that requests with conditions weren't supported. This is an amazing library and it would be great if you all could support that one day.

Thanks!

tleef commented

Why are conditions not supported? It seems sort of arbitrary.

Supporting conditions would require an unfortunate amount of complexity in the library, so they weren't included. This is because the library already uses conditions to ensure isolation and atomicity, so adding in caller-provided conditions would have made the state machine around handling conditional check failures even more complicated. It's certainly possible, but would be pretty hard to get right.

Fortunately, conditions are supported in the fully supported server-side transactions feature in DynamoDB! https://aws.amazon.com/blogs/aws/new-amazon-dynamodb-transactions/ The TransactWriteItems API makes it so you don't need any complicated library like this any more. Take a look!