This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-02
Channels
- # announcements (37)
- # babashka (9)
- # beginners (172)
- # calva (7)
- # cestmeetup (28)
- # chlorine-clover (27)
- # clj-kondo (2)
- # cljs-dev (45)
- # cljsrn (8)
- # clojure (185)
- # clojure-dev (27)
- # clojure-europe (6)
- # clojure-finland (3)
- # clojure-nl (5)
- # clojure-uk (13)
- # clojuredesign-podcast (4)
- # clojurescript (54)
- # conjure (19)
- # core-typed (1)
- # cursive (40)
- # datomic (9)
- # emacs (5)
- # figwheel-main (34)
- # fulcro (238)
- # graphql (14)
- # hugsql (3)
- # leiningen (4)
- # malli (6)
- # off-topic (12)
- # pedestal (5)
- # portkey (19)
- # protorepl (8)
- # rdf (2)
- # re-frame (23)
- # reagent (3)
- # reitit (16)
- # shadow-cljs (29)
- # spacemacs (12)
- # sql (1)
- # xtdb (15)
looking at https://github.com/StediInc/lambda, wondering if the generated jar would be fed to Graal native-image, and the library would generate a handler that works with the Lambda custom layer machinery...
I’ve been eyeballing this https://github.com/dainiusjocas/babashka-lambda-layer
Babashka can already do all kinds of things.. Just wondering if there was a lambda-layer that had babashka and AWS Command-Line Client.. That would cover a huge chunk of my lambda-needs. With native speed of course. 🙂
so I haven't actually used lambda layers, but trying to remember if they were stackable and if so, a bb layer ontop of that would be neat...
0% cat handler.clj
(ns handler
(:require [clojure.java.shell :refer [sh]]))
(defn handle [event context]
(println (sh "/opt/awscli/aws" "sts" "get-caller-identity"))
(assoc event "babashka" "rocks even harder"))
0% make invoke
START RequestId: c4e9f43c-da50-49b4-84ba-1c49a3af8cb7 Version: $LATEST
{:exit 0, :out {
"Account": "096681235511",
"UserId": "AROARNAVGSQ35VYJVCMF7:babashka-lambda-example",
"Arn": "arn:aws:sts::096681235511:assumed-role/hello-role-qryue13v/babashka-lambda-example"
}
, :err }
had forgotten about the SAR thing, installs layers via CloudFormation, just few clicks and you have babashka layer + awscli layer on your account, then copy ARNs to the babashka laer example Makefile and off you go 🙂
0% cat handler.clj
(ns handler
(:require [clojure.java.shell :refer [sh]]
[cheshire.core :as json]))
(defn handle [event context]
(-> (sh "/opt/awscli/aws" "sts" "get-caller-identity")
:out
(json/parse-string true)
:UserId
(println "says hi!")))
0% make invoke
START RequestId: a170b304-b30a-42ea-a194-d423e94ea843 Version: $LATEST
AROARNAVGSQ35VYJVCMF7:babashka-lambda-example says hi!
