install rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shadd the x86_64-unknown-linux-musl target to rustup:
rustup target add x86_64-unknown-linux-muslinstall zip:
sudo apt install zipbuild project using predefined target:
cargo build --release --target x86_64-unknown-linux-muslStore the built application in a zip:
zip -j rust.zip ./target/x86_64-unknown-linux-musl/release/bootstrapTo update the function code after the lambda has been created:
aws lambda update-function-code \
--zip-file fileb://./rust.zip \
--function-name FUNCTION_NAME \
--region REGIONSee this resource for more details, including instructions for building on MacOS.