I have a Dynamodb update expression and I would like to validate if a sum of fields values is greather than other value, something like this:
.withConditionExpression("#a + #b >= :myValue")
Like this Dynamodb returns an error. Is there a way to atomically validate that condition?
According to AWS Docs on Expressions Operators And Functions Syntax
Operands of the comparison operation can be only primitive field names (CANNOT be arithmetical expressions as in your question).
Documentation says:
In [...Condition expression...], an operand can be the following:
A top-level attribute name, such as Id, Title, Description or ProductCategory
A document path that references a nested attribute
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With