[ANN] AWS Lambda Julia runtime

Hello all,

I’ve seen the question of using Julia in AWS Lambda come up a few times in the past, but as far as I can see without any definite solution. AWS have built out their Lambda container functionality a bit since then, so I’ve tried to simplify the process of creating Julia docker containers - for use in AWS Lambda - here:

Users can fill in entires in a short-ish config file, write their code into a function.jl file, then use bash scripts to create a local image, test that image, and then push it up to AWS and create a lambda function based on it, when the time comes.

Julia seems to work reasonably well here - cold-start times are not great (about 10 seconds), but from a warm start it is very fast, and not excessively memory-intensive.

For the time being I’ve only tested this on Linux. Any bug reports/issues welcome.



Very interesting :+1: Thanks for putting this together!

You might want to bring PackageCompiler.jl into the mix to improve the cold-start times. See e.g. @dilumaluthge’s work here: GitHub - bcbi/SimpleContainerGenerator.jl: Create container images for using Julia packages (especially useful in environments without Internet access)


Thanks, yes - that’s an interesting package - I’m just looking at it and trying to figure out if it would help. At the moment I have the dependencies being precompiled at the stage of creating the docker image - does it offer performance gains beyond that?

Yes, absolutely! PackageCompiler.jl will generate a custom system image for the Julia compiler used in the container which will remove almost all of the start-up latency. Here is a nice example:

1 Like

Chris, this ia really great.
Functions As A Service - remember you heard it here first !

Ok, yes, that seems like quite a dramatic improvement. I’ll look at bringing this in.

1 Like

Much appreciated!

I seem to remember one issue being the size of Julia and its dependencies surpassing some limits imposed by AWS. Is that no longer the case? How did you get around that? Or did Julia get smaller?

I think I posted about those limits. But now see this announcement!
As an aside, I am told that if you have an Alexa then requests to Alexa are handled by lambdas. They eat their own dog food.
Alexa! Integrate this function for me for values of 0 to 2pi


Have you checked this?

I think the Lambda container size limit used to be 250mb and has now been raised to 10GB (as of December last year). The images I’m getting are about 500mb so the previous limit would have been a problem.

1 Like

No, which slightly surprises me, because I did a fair bit of googling on this topic.