This is a minimum example to set up a Rust project with AWS lambda and AWS SAM.
This exposes a single endpoint at root level that simply returns "Hello World!".
- Install SAM CLI
- Run
rustup target add x86_64-unknown-linux-musl
so that you can build a static binary to run in lambda environment. - Run
make
orsam build
to build the target. - Use
sam local start-api
to see your endpoint inhttp://localhost:3000/
. (Caution: This command is broken in the latest version. Use 1.12. See issue for details)