Skip to content

Instantly share code, notes, and snippets.

@goatandsheep
Last active December 16, 2019 03:45
Show Gist options
  • Save goatandsheep/77e2f1aaa73c5158300b0e1026841d00 to your computer and use it in GitHub Desktop.
Save goatandsheep/77e2f1aaa73c5158300b0e1026841d00 to your computer and use it in GitHub Desktop.
#if(${context.identity.username} != ${context.arguments.parentId})
$utils.unauthorized()
#else
{
"version" : "2017-02-28",
"operation" : "UpdateItem",
"key" : {
"childId": $util.dynamodb.toDynamoDBJson($ctx.args.childId),
"parentId": $util.dynamodb.toDynamoDBJson($ctx.identity.username)
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment