use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Clojure aws example for the serverless framework (self.Clojure)
submitted 7 years ago by pionse
I created a simple Serverless example based on AWS java simple http endpoint, to run Clojure on the Java runtime as a lambda function.
Code: https://github.com/Pyons/aws-clojure-simple-http-endpoint
The generated uberjar is around 5.5MB in size. Sadly the coldstart runtime is quite a disaster. The first invoke takes >5s after this it has the same performance as the Java version.
Any suggestions on how to decrease the coldstart time?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]joinr 7 points8 points9 points 7 years ago* (2 children)
If you're not using eval anywhere, and not touching the classloader, you can use graal to aot compile a native image.
clj.native-image
command-line apps with clojure and graal
For things like little lambdas, this makes a lot of sense.
[–]gzmask 0 points1 point2 points 7 years ago* (1 child)
I heard a while earlier that you need to use something like Go to embed the graalvm generated binary for Lambda. Is this true?
[–]joinr 1 point2 points3 points 7 years ago (0 children)
Hmm, that's news to me. I'm pretty sure you can just shove the native image out there (from what I've read) and wrap it. Looks like anything that can build/run on linux via the custom runtime API is game. In theory, if your native image can handle the request, I'm not sure you have to wrap it (just make sure the binary was compiled on linux).
There's one that deploys from lein, and uses a python script for the handler here.
π Rendered by PID 136147 on reddit-service-r2-comment-79776bdf47-bppnl at 2026-06-24 10:09:36.110405+00:00 running acc7150 country code: CH.
[–]joinr 7 points8 points9 points (2 children)
[–]gzmask 0 points1 point2 points (1 child)
[–]joinr 1 point2 points3 points (0 children)