l1x / axum-aws-lambda

Seamlessly use Axum on AWS Lambda

Home Page:https://crates.io/crates/axum-aws-lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

axum-aws-lambda

Rust crates.io

This crate provides a tower::Layer that translates hyper/axum requests to the format used by the aws-lambda-rust-runtime crate. This allows users to switch between just running a Hyper server, and running under the Lambda runtime - this dramatically speeds up development! It also means that you can use off-the-shelf components from the Tower ecosystem!

Check out examples/main.rs: running in debug mode runs a hyper server, and building for release mode compiles using the Lambda runtime.

Testing out the Lambda runtime locally

I have also provided an example Dockerfile & python script for locally spinning up a lambda runtime:

cargo build --release
docker build . -t lambda-test
docker run -p 9000:8080 lambda-test
python test_lambda_runtime

About

Seamlessly use Axum on AWS Lambda

https://crates.io/crates/axum-aws-lambda

License:MIT License


Languages

Language:Rust 65.3%Language:Python 22.2%Language:Dockerfile 12.5%