Created
March 9, 2016 05:23
-
-
Save pmuellr/126eb0404d2e98895d41 to your computer and use it in GitHub Desktop.
aws api gateway integration request mapping template for aws lambda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"method": "$context.httpMethod", | |
"resourcePath": "$context.resourcePath", | |
"querystring": { | |
#foreach($key in $input.params().querystring.keySet()) | |
"$key": "$input.params().querystring.get($key)"#if($foreach.hasNext),#end | |
#end | |
}, | |
"path": { | |
#foreach($key in $input.params().path.keySet()) | |
"$key": "$input.params().path.get($key)"#if($foreach.hasNext),#end | |
#end | |
}, | |
"header": { | |
#foreach($key in $input.params().header.keySet()) | |
"$key": "$input.params().header.get($key)"#if($foreach.hasNext),#end | |
#end | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not quite json ...
This is an AWS API Gateway integration request mapping template for lambda that populates the lambda event with most of the http stuff you really want. Specifically, try it with a lambda function like:
You can then curl that lambda, passing with something like
(assumes you set up test/tester/g as a resource)
and then see something like this: