This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-24
Channels
- # aws (7)
- # aws-lambda (3)
- # beginners (65)
- # boot (43)
- # cider (7)
- # cljs-dev (12)
- # cljsrn (15)
- # clojure (284)
- # clojure-austin (32)
- # clojure-brasil (4)
- # clojure-dusseldorf (4)
- # clojure-germany (1)
- # clojure-italy (40)
- # clojure-spec (21)
- # clojure-uk (69)
- # clojurescript (97)
- # core-async (11)
- # cursive (19)
- # data-science (1)
- # datascript (6)
- # datomic (30)
- # dirac (2)
- # emacs (4)
- # events (2)
- # fulcro (76)
- # graphql (38)
- # juxt (1)
- # lein-figwheel (1)
- # leiningen (6)
- # luminus (4)
- # lumo (13)
- # mount (4)
- # off-topic (24)
- # om (28)
- # onyx (32)
- # other-languages (1)
- # parinfer (40)
- # pedestal (1)
- # portkey (47)
- # re-frame (21)
- # reagent (4)
- # ring (4)
- # ring-swagger (3)
- # rum (1)
- # shadow-cljs (115)
- # spacemacs (5)
- # sql (14)
- # unrepl (1)
- # yada (3)
@cgrand: my clojure project does not build at the moment, but the moment it builds I'll switch to boot and test it out
@cgrand confirmed to work for the following function
(defn sh []
(str "trying again this time with boot function"))
I now have an issue where lambda is updated, api gateway is updated, but cloudfront is stilling calling the old version. This however, is no longer a portkey issue.
oh; I get it's a caching issue, caches probably assume that the return value of a GET request = does not change if URI does not change
@viesti: I called up AWS Business Support and got it resolved. There's three ways to call a lambda: 1. via the lambda endpoint 2. via the API Gateway endpoint that stages the lambda 3. via the CloudFront 'behaviour' that routes to the API Gateway now, when I update a lambda, and call the same URI, there . is potential for caching 1 & 2 do not do caching 3 does do caching (by default, but you can turn caching off)
@viesti: are you accessing lambda via API Gateway or CloudFront ? API Gateway has caching off by default.
Right, so according to the support engineer: If you use API Gateway end point (which uses CloudFront), caching is off by default. If you setup CloudFront separately (and create an origin [ppointing at API Gateway] + setup a Behaviour that points to origin), then Caching is on by default see: https://imgur.com/a/emNVY
The one thing I have not got a good answer on is -- why do I want lambda requests cached at all ?
=== Is there a way to control the name portkey uses?
(defn sh []
(str "trying again this time with boot function"))
(pk/mount! sh "/")
results in a function of a Lambda name of:
/server_-snip_-aws_Ish
now, is there a way me to control what name is used on Lambda ?found it: https://github.com/portkey-cloud/portkey/blob/master/src/main/clojure/portkey/core.clj#L604
I'm trying to call mount! as
(pk/mount! sh "/"
:lambeda-function-name "api-live")
but it's not creating a lambda with name api-livehttps://github.com/portkey-cloud/portkey/blob/master/src/main/clojure/portkey/core.clj#L657 <-- isn't it passed on ?
wtf, it's working now ... somehow my aws console was outdated (despite me clicking on refresh)
for anyone digging through the lotgs, what I ended up using is:
(defn h2 []
(str "trying again this time with boot function"))
(pk/mount! h2 "/" :lambda-function-name "live")