Skip to content

Instantly share code, notes, and snippets.

@leegilmorecode
Created July 15, 2021 11:48
Show Gist options
  • Save leegilmorecode/4d7a12646dcdbed12d92c193aafce245 to your computer and use it in GitHub Desktop.
Save leegilmorecode/4d7a12646dcdbed12d92c193aafce245 to your computer and use it in GitHub Desktop.
Example VTL showing substitutions and placeholders
#if($ctx.args.noteId == 0)
$utils.error($util.str.toReplace("${invalidValueErrorMessage}", "{0}", "$ctx.args.noteId"), "${invalidValueErrorType}")
#else
{
"version" : "2017-02-28",
"operation" : "GetItem",
"key" : {
"noteId" : { "S" : "${context.arguments.noteId}" },
},
"consistentRead" : true
}
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment