This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-02
Channels
- # announcements (11)
- # aws (3)
- # babashka (34)
- # beginners (20)
- # biff (2)
- # calva (3)
- # cherry (29)
- # cider (6)
- # cljs-dev (9)
- # clojure (124)
- # clojure-europe (12)
- # clojure-norway (5)
- # clojure-uk (2)
- # clojurescript (32)
- # conjure (11)
- # datalevin (1)
- # datomic (16)
- # deps-new (1)
- # etaoin (6)
- # holy-lambda (10)
- # honeysql (28)
- # hyperfiddle (21)
- # jackdaw (2)
- # jobs (2)
- # leiningen (15)
- # missionary (12)
- # off-topic (132)
- # other-languages (1)
- # pathom (13)
- # rdf (10)
- # re-frame (8)
- # reagent (5)
- # releases (1)
- # remote-jobs (4)
- # shadow-cljs (32)
- # tools-deps (6)
- # vim (15)
- # xtdb (24)
hi all.. first foray into holy-lambda. Got a couple of questions. Context: trying to create a Lambda function for my clojure code, preferably using graalvm.
1. I'm on an M1 Mac. While I can modify the docker image under bb.edn's :holy-lambda/options
parameter and successfully build an aarch64 native executable with bb hl:native:executable
, running sam local invoke ExampleLambdaFunction
fails because it's using an amd64 docker image, while my native executable is aarch64. If I try to build an amd64 native executable, well I ran out of patience after waiting 2 hours for the 2nd step (analysis) of the hl:compile
...
2. So ok I've given up on running it locally, no big deal. I want to deploy it. Same problem though ,seems that whatever runtime holy-lambda or sam is choosing is amd64-only, does not support aarch64.
3. So fiiine, I'm going to build a codebuild/codepipeline to just build the thing in AWS and deploy it, skip my local machine. Errr...... has anyone tried this before? sam's own pipeline bootstrap and init seemed to be working until I realized it doesn't actually build the native executable so of course nothing can be deployed. And before I try and go figure it out on my own, just wanted to check if that work has already been done by someone, somewhere....
4. failing all that, well if I could just use the babashka serverless runtime, that would work well too I suppose and skip all the above issues. My only issue would be about how to properly including my dependencies (clojurewerkz.money and its own dependency on joda.money) when using babashka...
ok, in template.yaml
, if I change the Runtime
property to provided.al2
then I can run this on arm64, after also adding the Architectures
property. Some progress!
ok so, back to #1 then, I can run it on arm64 and deploy it using sam, and figure out pipelines later.
Oh yes! I’m happy you have figured it out! Good for you!
thanks for all the hard work @UJ1339K2B, glad I don't have to figure out all these details by myself lol
OK and now I solved #3, after I figured out codebuild under arm64 + a few things I needed to install on the default Amazon Linux 2 image (clojure, babashka mainly), so this code can now be automatically deployed after a git push
Oh yes. Would be cool.
I know many people are using HL, but I always was too shy to ask users for a blog post :>