What does HackerNews think of aws-lambda-rust-runtime?

A Rust runtime for AWS Lambda

Language: Rust

Rust on Lambda's using containers as the deployment artifact are also very good, i'd say a perfect match. Low artifact size, low cpu+memory usage, fast execution. I think AWS must be using increasingly using Rust on Lambda internally from the talks I've seen them publish and the work gone in to https://github.com/awslabs/aws-lambda-rust-runtime.

For simple REST API's there's not much extra effort in using Rust once you are familiar.

This used to be harder -- you would set the lambda up for the go language runtime, but send your own statically linked binary with a special name instead of a compiled go artifact. But now AWS offers Custom Runtimes[0]. So you can set up the infra using some convenient tool such as AWS CloudFormation templates, terraform, or ansible, and then deploy your custom runtime c/c++ build from there (again, using ansible or AWS CLI or whatever). If you're using rust, there are now ways to make that work, including plugins for the popular "serverless" (sls) framework to deploy rust builds[1] [0] https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom... [1] https://github.com/awslabs/aws-lambda-rust-runtime
As of yesterday, lambda only provided a way to specify a function handler. The input to that function, and the response value from that function, needs to be deserialized and serialized (and implicitly, construct a runtime in which the concept of a function exists). Previously, a runtime for each supported language handled deserializing the wire protocol into a runtime object, invoking the specified function, routing stdout and stderr to cloudwatch, serializing the function's return value, and transforming runtime exceptions into response exceptions.

The lambda team is now letting you write that runtime, and presumably providing more documentation on the responsibilities of the runtime.

Check out the example C++ and Rust runtimes to understand why each language needed to have it's own custom runtime.

https://github.com/awslabs/aws-lambda-cpp

https://github.com/awslabs/aws-lambda-rust-runtime