Skip to content

Latest commit

 

History

History
38 lines (34 loc) · 877 Bytes

README.md

File metadata and controls

38 lines (34 loc) · 877 Bytes

On Ubuntu 20.04

Project setup

install rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

add the x86_64-unknown-linux-musl target to rustup:

rustup target add x86_64-unknown-linux-musl

install zip:

sudo apt install zip

Build

build project using predefined target:

cargo build --release --target x86_64-unknown-linux-musl

Store the built application in a zip:

zip -j rust.zip ./target/x86_64-unknown-linux-musl/release/bootstrap

Deploy

To 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 REGION

See this resource for more details, including instructions for building on MacOS.