Building Lambda functions with Rust
Because Rust compiles to native code, you don't need a dedicated runtime to run Rust code on Lambda. Instead, use the Rust runtime client
Tools and libraries for Rust
-
AWS SDK for Rust: The AWS SDK for Rust provides Rust APIs to interact with Amazon Web Services infrastructure services.
-
Rust runtime client for Lambda
: The Rust runtime client makes it easy to run Lambda functions written in Rust. -
Cargo Lambda
: This is a third-party open-source extension to the Cargo command-line tool that simplifies building and deploying Rust Lambda functions. -
Lambda HTTP
: This library provides a wrapper to work with HTTP events. -
Lambda Extension
: This library provides support to write Lambda Extensions with Rust. -
AWS Lambda Events
: This library provides type definitions for common event source integrations.
Sample Lambda applications for Rust
-
Basic Lambda function
: A Rust function that shows how to process basic events. -
Lambda function with error handling
: A Rust function that shows how to handle custom Rust errors in Lambda. -
Lambda function with shared resources
: A Rust project that initializes shared resources before creating the Lambda function. -
Lambda HTTP events
: A Rust function that handles HTTP events. -
Lambda HTTP events with CORS headers
: A Rust function that uses Tower to inject CORS headers. -
Lambda REST API
: A REST API that uses Axum and Diesel to connect to a PostgreSQL database. -
Serverless Rust demo
: A Rust project that shows the use of Lambda's Rust libraries, logging, environment variables, and the AWS SDK. -
Basic Lambda Extension
: A Rust extension that shows how to process basic extension events. -
Lambda Logs Amazon Data Firehose Extension
: A Rust extension that shows how to send Lambda logs to Firehose.