|new 0.9.2||Oct 17, 2020|
|0.9.1||Sep 12, 2020|
|0.9.0||Sep 12, 2020|
#173 in Network programming
Build a Rust project in a container for deployment to either an instance running AWS Linux 2 or AWS Lambda.
This crate only handles building the project locally. It does not interact with any AWS services.
cargo install aws-build
In the common case you should be able to just run
aws-build al2 or
aws-build lambda in the directory of the project you want to
On successful completion, the output file (either a standalone executable
for Amazon Linux 2 or a zip file containing a "bootstrap" executable
for AWS Lambda) is written to a subdirectory of the
directory. There is also a
target/latest-lambda symlink that points to the output file.
aws-build <mode> [<project>] [--container-cmd <container-cmd>] [--rust-version <rust-version>] [--strip] [--bin <bin>] Build the project in a container for deployment to AWS. mode: al2 or lambda (for Amazon Linux 2 or AWS Lambda, respectively) project: path of the project to build (default: current directory) Options: --container-cmd container command (default: docker) --rust-version rust version (default: latest stable) --strip strip debug symbols --bin name of the binary target to build (required if there is more than one binary target) --help display usage information
- amazon-linux: Docker image replicating the Aamazon Linux environment.
- cargo-aws-lambda: "dependency free cargo subcommand for cross-compiling, packaging and deploying code quickly to AWS Lambda"
- docker-lambda: "A sandboxed local environment that replicates the live AWS Lambda environment almost identically"
- lambda-rust: "a faithful reproduction of the actual AWS [...] Lambda runtime environment" with the stable Rust toolchain installed