This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-30
Channels
- # aleph (1)
- # beginners (126)
- # cider (2)
- # clara (38)
- # cljsrn (2)
- # clojars (2)
- # clojure (49)
- # clojure-dev (31)
- # clojure-dusseldorf (1)
- # clojure-finland (1)
- # clojure-france (6)
- # clojure-italy (13)
- # clojure-nl (12)
- # clojure-russia (9)
- # clojure-sg (1)
- # clojure-spec (33)
- # clojure-uk (83)
- # clojurescript (206)
- # community-development (3)
- # core-async (40)
- # cursive (4)
- # datomic (7)
- # duct (21)
- # emacs (9)
- # fulcro (36)
- # funcool (2)
- # graphql (12)
- # instaparse (4)
- # jobs (4)
- # lumo (24)
- # mount (1)
- # nyc (4)
- # off-topic (29)
- # onyx (1)
- # pedestal (2)
- # random (4)
- # re-frame (60)
- # reagent (136)
- # remote-jobs (1)
- # schema (1)
- # shadow-cljs (20)
- # spacemacs (6)
- # specter (14)
- # tools-deps (2)
Deploying to heroku was a snap, but I’m trying to get wild and deploy to AWS Lambda - and I feel like what I need is a handler with resolved dependencies - if there is such a thing
I haven’t actually used AWS Lambda so I’m not sure what’s involved.
And the deflambda macro: https://github.com/uswitch/lambada/blob/master/src/uswitch/lambada/core.clj#L4
certainly not a show stopper for many, but the price tag for lambda is too appealing 🙂
as I figure out my way around duct, I would love to write up a module or something to give back
You could probably do something like:
(deflambdafn blah [in out ctx]
(:foo.lambda/blah (ig/init config [:foo.lambda/blah])))
But perhaps there’s a way of ensuring that the config doesn’t need to be reinitialised?
Something to investigate I guess. Lambda functions don’t appear to be directly compatible with Ring handlers.
(let [f (:foo.lambda/blah (ig/init config [:foo.lambda/blah]))]
(deflambdafn ...
Perhaps it works with a let
? No idea 🙂
Yeah, you could cache it? But a let
might be a better idea…