@qqq ^^ test and report
one small step for man, but giant leap for Boot π
:bravetrue:
@cgrand: my clojure project does not build at the moment, but the moment it builds I'll switch to boot and test it out
thanks for tracking it down and fixint it
@cgrand confirmed to work for the following function
(defn sh []
(str "trying again this time with boot function"))
cool
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
hmm
probably maps to caching in Cloudfront, which I should actually use myself also
or learn to use that is
@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)
hmm so I donβt remember explicitly turning off caching
@viesti: are you accessing lambda via API Gateway or CloudFront ? API Gateway has caching off by default.
so I guess API Gateway
I though that API gateway is a facade over Cloudfront π
or thereabouts
me too
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-livehmm, we donβt pass :lambda-function-name
onwards from pk/mount!
macro currently
or
on line 656 could work
https://github.com/portkey-cloud/portkey/blob/master/src/main/clojure/portkey/core.clj#L657 <-- isn't it passed on ?
no, (make-lambda-function-name (meta ~var-f))
creates the name
should do grab from arguments of mount!
right, but it's in an (into ... )
so the arguments from mount! goes into opts
aa
which should overwrite it due to the (into ...) on that line
@qqq you have an extra βeβ in your snippet
except it's not working π
that too
lambEda
@cgrand: (pk/mount! h2 "/" :lambda-function-name "live") isn't working either
but yes, valid typo
or rather, vaild point that I made a typo
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")
what is it with AWS limiting me on: * # of lambda I can post per minute * # of apis I can delete per minute (seems ot be set at 1)
http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
have hit on the management limits myself also
They should make these limits "burstable" -- 29 days out of the month, I don't need to modify anything; but when I need to modify it, it's generally 5-10 changes I need to make.