Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Last active November 29, 2018 22:47
Show Gist options
  • Select an option

  • Save adrianhall/dfc8e10bde90208d5acdbc56864c5a81 to your computer and use it in GitHub Desktop.

Select an option

Save adrianhall/dfc8e10bde90208d5acdbc56864c5a81 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