Skip to content

DavidVujic/clojure-lambda-experiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clojure Lambda Experiments

Experimenting with AWS Lambda and Clojure.

  • Ahead of time compilation (AOT) ✅
  • Build an Uberjar ✅
  • Build a native image with GraalVM ✅
  • Run the compiled code in Docker ✅
  • Push the Docker file to AWS 😕
  • Add a lambda using the Docker container and test if the entry point is correct 😕
  • Create a bash custom runtime for AWS Lambda ✅
  • Deploy the custom runtime with the Clojure code compiled to a native image ✅
  • Test the custom runtime locally in Docker, using a Custom Runtime image from AWS ✅

Resources

Notes

Clojure version

Using Clojure 1.10.2 that has GraalVM specific features/fixes.

Deploying to AWS vs testing locally

I found out that, when running the custom runtime locally in Docker with a custom runtime image, the bootstrap file should be copied in a different directory than the function code - not sure how this works when only pushing a zip to AWS.

GraalVM

I downloaded GraalVM, extracted the downloaded file and ran a virus scan (ClamTK). The scanner found a potential threat, that confused me: a Node.js npm package called imurmurhash.min.js. ClamTK status for this file was: PUA.Win.Trojan.Xored-1.

My quick fix for this was to navigate to the graalvm-ce-java11-21.0.0.2/languages folder and delete the entire js folder before running any GraalVM commands.

Why was this file flagged by the virus scanner?

About

Experimenting with AWS Lambda, GraalVM and Clojure

Topics

Resources

Stars

Watchers

Forks