Skip to content
Example of AWS Lambda written in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo
src
.gitignore
Cargo.lock
Cargo.toml
README.md
rust.zip

README.md

aws-lambda-rust

Testing this guide to deploy some Rust in AWS Lambda.

If you need more information you can read my AWS Lambda Functions written in Rust blog post where I describe all the steps I took to build and publish a Lambda Function in Rust.

Building the crate in OSX

In order to build this project in OSX you must ensure that you have a folder called .cargo with a config file in it. This file must contain exactly this:

[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"

Building the crate in Linux

Install the musl-tools:

sudo apt install musl-tools

Remove the .cargo folder if present or comment the contents of the config file.

Common building steps

# this will start the build process
cargo build --release --target x86_64-unknown-linux-musl
# this will create the final zip
zip -j rust.zip ./target/x86_64-unknown-linux-musl/release/bootstrap
You can’t perform that action at this time.