This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-16
Channels
- # architecture (12)
- # aws (8)
- # bangalore-clj (1)
- # beginners (172)
- # boot (25)
- # chestnut (3)
- # cider (15)
- # cljsrn (5)
- # clojure (170)
- # clojure-india (1)
- # clojure-italy (21)
- # clojure-nl (87)
- # clojure-romania (3)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-uk (79)
- # clojurescript (79)
- # cursive (2)
- # datomic (29)
- # dirac (26)
- # emacs (7)
- # fulcro (13)
- # jobs (4)
- # juxt (22)
- # lein-figwheel (1)
- # leiningen (2)
- # lumo (39)
- # nrepl (1)
- # off-topic (54)
- # onyx (124)
- # pedestal (1)
- # planck (4)
- # portkey (1)
- # re-frame (36)
- # reagent (2)
- # ring-swagger (8)
- # shadow-cljs (107)
- # spacemacs (1)
- # specter (25)
- # sql (7)
- # tools-deps (5)
- # vim (10)
- # yada (25)
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 atm...one 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": [
"Events"
],
...
"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