Can I use a custom Lambda runtime?


I’m trying to upgrade to Jets v3.x and Ruby 2.7 but my current functions rely on having both tar and curl available in the runtime environment. The new Ruby 2.7 Lambda runtime is based on the AWS Linux 2 AMI which annoyingly has removed these binaries.

So I seem to have 2 options:

  1. Introduce the required binaries via a Lambda layer
  2. Create my own custom Lambda runtime with built-in support

I’m struggling to find any details for either of these options. There are hundreds of tutorials about creating a Lambda layer for 3rd-party libraries (e.g. imagemagick) but none for basic low-level utils like tar/curl/gzip etc.

I also cannot find anything in the Jets docs which talk about using custom Lambda runtimes, as I could easily build my own runtime - but I have no idea how to make Jets use it.

Any help here would be greatly appreciated.



Note: Only have tested custom layers with this. So know that works. Don’t remember testing custom runtimes. So unsure if that’ll work.

Hi, thanks for the reply. I’m already using a couple of custom layers in my Jets functions so all good there. However, looking at the Jets docs I see you can control properties at both a class and function specific level:

One of the functions is runtime or class_runtime. Can you please provide a bit more information regarding how this actually works? So if I change this property what am I actually changing?

The Runtime sets this Lambda function property:

In theory, it should be possible to set that in combination with a Custom Runtime Lambda Layer to use your own runtime. However, the devil-are-in-the-details and haven’t tested it yet. So you may run into issues. Will considered PRs around this. Of course no sweat either way :+1: Hope to take a look in time.