holy-lambda version in bb.edn and deps.edn.hl:update-bb-tasks to update the tasks.holy-lambda version in bb.edn and deps.edn.hl:update-bb-tasks to update the tasks.Update holy-lambda version in bb.edn and deps.edn.
In this release :envs property from :ctx object has been removed to prevent cases, where the credentials are exposed in CloudWatch.
To get the :envs please use (System/getenv "ENVIRONMENT_VARIABLE") instead.
For cases where the env was passed in agent-native-payloads use following helper:
(defn get-env
[env & [ctx]]
(or (get ctx env) (System/getenv env)))
(defn LambdaFunction
[{:keys [ctx event]}]
(let [hl-entrypoint (get-env ctx "HL_ENTRYPOINT")]
(println hl-entrypoint)))
Bump holy-lambda dependency in bb.edn and deps.edn:
{:deps {...
io.github.FieryCod/holy-lambda {:mvn/version "0.6.3"}}
holy-lambda dependency in bb.edn**bb.edn**
```clojure
{:deps {...
io.github.FieryCod/holy-lambda {:mvn/version "0.6.2"}}
```
:sha version of io.github.FieryCod/holy-lambda-babashka-tasks to e6c47274a2bfc7576a9da0ccdbc079c1e83bee17.**bb.edn**
```clojure
{:deps {io.github.FieryCod/holy-lambda-babashka-tasks
{:git/url "https://github.com/FieryCod/holy-lambda"
:deps/root "./modules/holy-lambda-babashka-tasks"
:sha "e6c47274a2bfc7576a9da0ccdbc079c1e83bee17"}}}
```
hl:update-bb-tasks in bb.edn.**bb.edn**
```clojure
:tasks {:requires ([holy-lambda.tasks])
hl:docker:run holy-lambda.tasks/hl:docker:run
hl:native:conf holy-lambda.tasks/hl:native:conf
hl:native:executable holy-lambda.tasks/hl:native:executable
hl:babashka:sync holy-lambda.tasks/hl:babashka:sync
hl:compile holy-lambda.tasks/hl:compile
hl:doctor holy-lambda.tasks/hl:doctor
hl:clean holy-lambda.tasks/hl:clean
hl:update-bb-tasks holy-lambda.tasks/hl:update-bb-tasks
hl:version holy-lambda.tasks/hl:version}}
```
New version of the backend (0.6.2) doesn't ship the holy-lambda artifact, therefore you have to pack the holy-lambda yourself.
Migrating to new backend version:
template.yml.holy-lambda/bb-clj-deps.bb hl:babashka:sync to populate .holy-lambda/bb-clj-deps.**Example:**
```yml
BabashkaDepsLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: BabashkaDepsLayer
ContentUri: ./.holy-lambda/bb-clj-deps
ExampleLambdaFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: ExampleLambdaFunction
Handler: com.company.example-lambda.core.ExampleLambda
CodeUri: src
Events:
HelloEvent:
Type: HttpApi
Properties:
ApiId: !Ref ServerlessHttpApi
Path: /
Method: GET
Layers:
- arn:aws:lambda:eu-central-1:443526418261:layer:holy-lambda-babashka-runtime-amd64:3
- !Ref BabashkaDepsLayer
```
The new version of HL removes the hl:sync step, therefore the development should be faster now.
To take the advantage of the new tasks release follow these steps.
bb.edn:mvn/local-repo:build/clj-alias:runtime/entrypoint:tasks with the following set of tasks:```clojure
:tasks {:requires ([holy-lambda.tasks])
hl:docker:run holy-lambda.tasks/hl:docker:run
hl:native:conf holy-lambda.tasks/hl:native:conf
hl:native:executable holy-lambda.tasks/hl:native:executable
hl:babashka:sync holy-lambda.tasks/hl:babashka:sync
hl:compile holy-lambda.tasks/hl:compile
hl:doctor holy-lambda.tasks/hl:doctor
hl:clean holy-lambda.tasks/hl:clean
hl:version holy-lambda.tasks/hl:version}}
```
:sha in bb.edn with the newest tag version: eb299bf6e380bcc8e484e80f8f16363bc5deb41c:mvn/local-repo property from deps.edn:uberjar alias in deps.edn with the following:
clojure {:uberjar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.303"}} :exec-fn hf.depstar/uberjar :exec-args {:aot ["<VALUE_OF_ENTRYPOINT>"] :main-class "<VALUE_OF_ENTRYPOINT>" :jar ".holy-lambda/build/output.jar" :jvm-opts ["-Dclojure.compiler.direct-linking=true" "-Dclojure.spec.skip-macros=true"]}}}:build/compile-cmd property with clojure -X:uberjar command in string.:runtime to :backend property in bb.edn.Babashka backend now supports arm64 and amd64 architectures on Amazon Linux 2.
:information_source: The old layer holy-lambda-babashka-runtime is now deprecated
instead one of the following layers should be used:
The difference between both versions is in cold starts, where arm64 has at least 100ms cold start improvement.
Additionally for downloading pods & clojure deps the new bb hl:babashka:sync is used.
:information_source: ARM64 version requires a arm64/aarch64 version of holy-lambda-builder
Babashka runtime requires additional environment variable (previously Entrypoint) now HL_ENTRYPOINT.
DockerHub version of fierycod/graalvm-native-image builder has been deprecated.
Use new holy-lambda-builder.
See here
Can you improve this documentation? These fine people already did:
Karol Wójcik & lowecgEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |