Creating a custom Julia AWS Layer Runtime

To deploy a Julia program on AWS Lambda currently involves making a custom Docker Image. Recently, Amazon announced the ability to create a Custom Runtime, which lowers the barrier to entry. However, their tutorial is quite lacking and they mostly seem to be partnering with companies?

Does anyone know how difficult it is to make a Custom Runtime? Alternatively, are there any plans to partner with AWS Lambda?

8 Likes

I’ve looked into this a bit; I don’t think it will be too bad to create a julia-based custom runtime, along with “layers” for popular packages. I’ll probably be playing around with creating the julia runtime this week a bit.

3 Likes

Please let me know if there’s any way I can help with this. I looked at the documentation and was absolutely baffled.

I am currently at the AWS London User Group - a report back on re:Invent
The speaker is discussign these custom runtime - GO, Rust, cobol(!) C++
But no mention of Julia. Its a high level overview, so no mention of how hard it is to create a specific one for Julia.
the talk is by Danilo Poccia, Principal Evangelist Serverless, AWS
I will ask if the slides are available.

Count me in for testing too @Seanny123 @quinnj

I talked with Danilo after the meeting, he thinks it should be easy to create a custom runtime for Julia. Not much time to talk, but mentioned a bootstrap process.
I dont know how this would fit in with Julias package structure - maybe we woudl need a different runtime for each mix of packages we need - to be seen when the rubber hits the road of course.

This line reads as if it was taken from some dystopian SciFi book…

1 Like

Here is start or some seed?

Files · master · bibourokushi / try aws custom runtime for julia · GitLab

This is a good seed! However, I’m still confused by the set of invocations and how to handle them.

An experimental AWS lambda runtime for Julia can be found in https://github.com/FugroRoames/aws-lambda-julia-runtime

1 Like

Thanks to my co-worker’s heroic efforts, we managed to update your run-time to Julia 1.0. We’ll update the instructions and provide background on how the steps required in the future.

4 Likes

The link doesn’t work for me.

Sorry, I didn’t realize the project was private. I’ve made it public now.

Current issues still being worked on:

  1. Telling Julia where to find packages
  2. Resolving bugs we haven’t noticed yet…

I would be relly interested in hearing more about your (and others’) experiences. I understand you weren’t quite successful in the end @Seanny123? What were the remaining problems? How did it work apart from these?

We got Hello World going, but communication was impossible due to being unable to import Http.jl. It existed. It seemed to be in the expected place, however Julia could not find it.

Has anyone had any more luck with this yet? I have been using samoconnor/AWSLambda.jl but would like to use my Julia1. code.

1 Like

I’ve been working on this a bit using your code as a start @Seanny123. The main problem I’ve run into is the AWS limit on the size of the zip. The runtime zipped is ~70MB, but AWS requires a max of 50MB. Were you able to shrink the size down any further?

I thought AWS Lambda “layers” had different limits than functions? I think that’s why we were able to run our layer despite the larger size.

Hmmm, yeah, that’s what I thought too. But

aws lambda publish-layer-version --layer-name julia-runtime --zip-file fileb://packaging/julia-v1.zip 

An error occurred (RequestEntityTooLargeException) when calling the PublishLayerVersion operation: Request must be smaller than 69905067 bytes for the PublishLayerVersion operation

Actually, this limit seems to be for direct zip-upload only. The limit is removed if we put the zip file in s3 and point to the zip file in s3.

2 Likes