portkey 2017-09-05

so what I figure is that with :postwe would pass parsed json from API Gateway (have not yet figured out other content types, binary is nowadays an option too) into a single-arity mounted function

what api gw gives lookes like this now:

Mon Sep 04 19:57:03 UTC 2017 : Endpoint request body after transformations: {
“body-json” : {“a”:1},
“params” : {
“path” : {
    }
    ,“querystring” : {
    }
    ,“header” : {
    }
    },
“stage-variables” : {
},
“context” : {
    “account-id” : “262355063596",
    “api-id” : “04d57u6034",
    “api-key” : “test-invoke-api-key”,
    “authorizer-principal-id” : “”,
    “caller” : “262355063596",
    “cognito-authentication-provider” : “”,
    “cognito-authentication-type” : “”,
    “cognito-identity-id” : “”,
    “cognito-identity-pool-id” : “”,
    “http-method” : “POST”,
    “stage” : “test-invoke-stage”,
    “source-ip” : “test-invoke-source-ip”,
    “user” : “262355063596",
    “user-agent” : “Apache-HttpClient/4.5.x (Java/1.8.0_131)“,
    “user-arn” : “arn:aws:iam::262355063596:root”,
    “request-id” : “test-invoke-request”,
    “resource-id” : “2jmogc”,
    “resource-path” : “/h”
    }
}

aiming for post with json body for now

then one could the JSON to a Ring Request map

would like to do smallest amount of velocity template as possible :)

hmm, how does proxy appear in swagger?

I’m not sure that there would still be some swagger

ring request/response map would anyway make talking to api gw a bit more consistent and familiar

hum, thinking that where would the route be configured

has memore seeing the catch all

basically we could have API GW to mostly work as a reverse proxy

> Lambda Function Integration – A new default mapping template will send the entire request to your Lambda function and then turn the return value into an HTTP response.

yes that is the intention

that quote leads me to think that there is still some Velocity thing in between

anyway, looks like a path to take

if there is swagger, it’s minimal

thanks, that’s somehow what I imagined

finally looked up what was pointed in the question after talk

Zappa has progress bar, hrm

looking at Readme

~5MB minimal lambda

hmm, why so large...

> Zappa makes it super easy to build and deploy all Python WSGI applications on AWS Lambda + API Gateway.

they go for the ring equivalent of Python

we should hack away the AWS API so that there is a feeling that the user owns AWS, not the other way around :)

👍 1

how didn't I spot this earlier

My thoughts exactly: let's put the user in control.