Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Last active December 19, 2018 17:19
Show Gist options
  • Save adrianhall/fd00dbb5b8244bb572ee22f27c7673ac to your computer and use it in GitHub Desktop.
Save adrianhall/fd00dbb5b8244bb572ee22f27c7673ac to your computer and use it in GitHub Desktop.
#set($keys = [])
#foreach($id in ${ctx.prev.result.ids})
#set($key = {})
$util.qr($key.put("typeName", $util.dynamodb.toString("LOCATION")))
$util.qr($key.put("id", $util.dynamodb.toString($id)))
$util.qr($keys.add($key))
#end
{
"version": "2018-05-29",
"operation" : "BatchGetItem",
"tables" : {
"devRestaurantReviews": {
"keys": $util.toJson($keys),
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment