Fork me on GitHub
#babashka
<
2020-06-02
>
plexus14:06:10

babashka wrapper script, updated to use deps.clj so it works even when clojure is absent https://github.com/lambdaisland/open-source/blob/master/bin/bb

plexus14:06:51

had an issue once again with clojure CLI not being installed on CI, so decided to fix this 🙂

borkdude15:06:40

awesome 🙂

viesti19:06:18

oh my, didn't realise how easy it was to install Lambda layers, just tried out a Lambda with babashka and aws cli layers and it worked neat 🙂

viesti19:06:00

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!

♥️ 12
lukasz19:06:43

Ohhh, that's really handy

viesti19:06:48

bb + awscli 💥

viesti08:06:31

yup, I used that and https://github.com/aws-samples/aws-lambda-layer-awscli both. Since you can have up to five layers in a Lambda, you can neatly combine bahaska with other tools 🙂