Rust + AWS Lambda

Is there a ‘standard’ way to run Rust on AWS Lambda?

I have a number of Kotlin-Lambda functions that I would like to convert over to Rust.

My current choices appear to be:

  1. wrap Rust via Node.js
  2. wrap Rust via Python
  3. wrap Rust via Go

From googling, there does not seem to be a clear winner/package to use.

What is the most straight forward way to run Rust on AWS Lambda?

Thanks!

2 Likes

I gather that using the Go runtime, and just supplying an executable compiled from Rust rather than Go, works fine. I’ve not tried it myself.

Rust is not officially supported by Lambda. Aside from using Rust modules wrapped inside a supported runtime, there's a neat "hijacking" of Golang support, which mimics the Go RPC stack inside a pure Rust binary. The Lambda machinery is none the wiser, and doesn't care.

1 Like