Liking cljdoc? Tell your friends :D

Frequently Asked Questions?! (FAQ)

What is native runtime?

Native runtime is GraalVM native-image compiled version of AWS Custom Runtime. Native runtime is entirely written in Clojure and upon native:executable packed with the user code. The output artifact of this operation is zip which can be deployed with any of the available deployment tools.

Can I use HL with CDK, Pulumi, Terraform?

Sure! HL doesn't stop you from using any of above deployment tools. All you need is the knowledge how to build deploy-able artifacts, that you can reference in your deployment descriptor.

Deploy-able artifact coordinate according to runtime

  • :java (java8, java8-corretto) -> .holy-lambda/build/output.jar (Either Official Java8 or Java8 corretto runtime)

    bb stack:sync && bb stack:compile
    
  • :native (provided) -> .holy-lambda/build/latest.zip (Native runtime is built into the user codebase)

    bb stack:sync && bb stack:compile && bb stack:executable
    
  • :babashka (provided) -> src (Application sources provided as is)

    Babashka runtime is provided as a deployable serverless layer which you have to deploy manually and reference it's ARN. 0. Make sure that you have :runtime:self-manage-layers? set to true!

    1. Deploy the following application and get the ARN of the layer.
    2. Pack src into zip.
    3. Reference the zip file in your lambda definition.
    4. Set runtime to provided and reference ARN of the layer in layers option.
    5. Additional Clojure deps should be packed to a layer. Clojure deps are stored at: .holy-lambda/bb-clj-deps.
    6. Additional babashka pods should be packed to a layer. Babashka pods are stored at .holy-lambda/pods.

Does native-agents-payloads are used by bb stack:invoke?

Nope! Payloads in native-agents-payloads are used only by :native runtime during bb native:conf to gather all the reflective calls the code/libraries use.

You can however generate an event which you can then fed to bb stack:invoke :event-file <generated-event-file> by using sam local generate-event <service>.

More info here.

Is HL runtime asynchronous?

Nope! Native, Babashka and Java runtimes are synchronous, but handlers can be asynchronous for convenience and return either:

  • Channel
  • Future
  • Promise

Still though the runtime will wait for the result of asynchronous handler, before taking a new task to process.

Scaling lambdas should be achieved via concurrency option. More info here

Can you improve this documentation?Edit on GitHub

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

× close