Liking cljdoc? Tell your friends :D

Migration Guide

0.6.5 -> 0.6.6

  1. Update holy-lambda version in bb.edn and deps.edn.
  2. Use hl:update-bb-tasks to update the tasks.

0.6.4 -> 0.6.5

  1. Update holy-lambda version in bb.edn and deps.edn.
  2. Use hl:update-bb-tasks to update the tasks.

0.6.3 -> 0.6.4

Update holy-lambda version in bb.edn and deps.edn.

0.6.2 -> 0.6.3

  1. 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)))
    
  2. Bump holy-lambda dependency in bb.edn and deps.edn:

 {:deps {...
         io.github.FieryCod/holy-lambda {:mvn/version "0.6.3"}}

0.6.0 -> 0.6.2

Tasks

  1. Add a holy-lambda dependency in bb.edn
**bb.edn**
```clojure
{:deps {...
        io.github.FieryCod/holy-lambda {:mvn/version "0.6.2"}}
```
  1. Update the :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"}}}
```
  1. Add 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}}
```

Babashka backend

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:

  1. Deploy new version of the backend:
  1. Reference a new layer version ARN in template.yml
  2. Add a local layer that points to .holy-lambda/bb-clj-deps.
  3. Run 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 
```
  1. Deploy!

0.5.0 -> 0.6.0

Tasks

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.

  1. Remove the following properties from bb.edn
  • :mvn/local-repo
  • :build/clj-alias
  • :runtime/entrypoint
  1. Replace :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}}
 ``` 
  1. Replace the :sha in bb.edn with the newest tag version: eb299bf6e380bcc8e484e80f8f16363bc5deb41c
  2. Remove :mvn/local-repo property from deps.edn
  3. Replace :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"]}}}
  4. Add :build/compile-cmd property with clojure -X:uberjar command in string.
  5. Rename :runtime to :backend property in bb.edn.

Backends

Babashka

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:

  • amd64 (drop in replacement for now deprecated layer)
  • arm64

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.

Docker images

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 & lowecg
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close