Created
May 8, 2020 20:55
-
-
Save dabit3/4aa84f9b7d453a093cf8e99c1166a798 to your computer and use it in GitHub Desktop.
DynamoDB update expression in VTL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2018-05-29", | |
"operation": "UpdateItem", | |
"key" : { | |
"id" : $util.dynamodb.toDynamoDBJson($context.arguments.id) | |
}, | |
"update": { | |
"expression" : "set #upvotes = #upvotes + :updateValue", | |
"expressionNames" : { | |
"#upvotes" : "upvotes" | |
}, | |
"expressionValues" : { | |
":updateValue" : { "N" : 1 } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment