Skip to content

Instantly share code, notes, and snippets.

View postkin's full-sized avatar

Kin Lane postkin

View GitHub Profile
@postkin
postkin / aws-api-gateway-lambda.json
Created February 11, 2020 04:10
aws-api-gateway-lambda
{
"x-amazon-apigateway-integration": {
"uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:879370021840:function:ans_update_application/invocations",
"responses": {
"default": {
"statusCode": "200",
"responseParameters": {
"method.response.header.Access-Control-Allow-Origin": "'*'"
}
}
@postkin
postkin / aws-api-gateway-dynamodb.json
Created February 11, 2020 04:08
aws-api-gateway-dynamodb
{
"x-amazon-apigateway-integration": {
"uri": "arn:aws:apigateway:us-east-1:dynamodb:action/Scan",
"responses": {
"default": {
"statusCode": "200",
"responseTemplates": {
"application/json": "#set($inputRoot = $input.path('$'))\n[\n #foreach($elem in $inputRoot.Items) {\n \"id\": \"$elem.id.S\",\n \"given_name\": \"$elem.given_name.S\",\n \"description\": \"$elem.description.S\",\n \"website_url\": \"$elem.website_url.S\"\n }#if($foreach.hasNext),#end\n#end\n]"
}
}
@postkin
postkin / aws-api-gateway-pass-through.json
Created February 11, 2020 00:56
aws-api-gateway-pass-through
{
"x-amazon-apigateway-integration": {
"uri": "http://functions.laneworks.net/locations/regions-get.php",
"responses": {
"default": {
"statusCode": "200"
}
},
"passthroughBehavior": "when_no_match",
"httpMethod": "GET",