Skip to content

Instantly share code, notes, and snippets.

@r7kamura
Last active May 30, 2016 11:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r7kamura/c6cc5967f1d08939fed0 to your computer and use it in GitHub Desktop.
Save r7kamura/c6cc5967f1d08939fed0 to your computer and use it in GitHub Desktop.
{
"accountId": "$context.identity.accountId",
"apiId": "$context.apiId",
"apiKey": "$context.identity.apiKey",
"caller": "$context.identity.caller",
"headers": {
#foreach( $key in $input.params().header.keySet() )
"$key": "$input.params().header.get($key)"#if( $foreach.hasNext ),#end
#end
},
"httpMethod": "$context.httpMethod",
"path": "$context.resourcePath",
"pathParameters": {
#foreach( $key in $input.params().path.keySet() )
"$key": "$input.params().path.get($key)"#if( $foreach.hasNext ),#end
#end
},
"queryParameters": {
#foreach( $key in $input.params().querystring.keySet() )
"$key": "$input.params().querystring.get($key)"#if( $foreach.hasNext ),#end
#end
},
"requestId": "$context.requestId",
"requestParameters": $input.json('$'),
"resourceId": "$context.resourceId",
"sourceIp": "$context.identity.sourceIp",
"stage": "$context.stage",
"user": "$context.identity.user",
"userAgent": "$context.identity.userAgent",
"userArn": "$context.identity.userArn"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment