Fork me on GitHub

Anyone have a strategy/framework for developing a Clojure lambda function behind api-gateway that can also be developed/tested/used locally more like a regular ring function?


@juliobarros I started to use terraform with a swagger template that is built manually could actually do it directly from spec 😉


@richiardiandrea is that to specify the api gateway swagger? I’m using the proxy with a more command/query approach not to REST-ish so my question is more basic. I’d love something to translate a ring request into a lambda context (or the other way around) so that I can run my function locally to test and develop the front end cljs app.


@juliobarros I think AWS allows it yes, you need to use their "extensions" though, so for instance I had to do this:


"/query-events": {
      "post": {
        "tags": [
        "x-amazon-apigateway-integration": {
          "httpMethod": "POST",
          "requestParameters": "body",
          "type": "aws_proxy",
          "uri": "arn:aws:apigateway:${aws_region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${aws_region}:${aws_account_id}:function:${query_events_function_name}/invocations"


Ok. Thanks. Its been a while since I looked at this, I’m considering it for a new project, and I’ll need to refresh my understanding. Thanks again.


yeah, I am writing it manually now but it could be generated


I have this as a swagger template at the moment and I don't have many lambdas, so I haven't had the need for automation