{"id":23391,"library":"cargo-lambda","title":"cargo-lambda","description":"A Cargo subcommand for building, deploying, and testing AWS Lambda functions written in Rust. Current version 1.9.1, released on 2025-11-01. Active development with periodic releases.","status":"active","version":"1.9.1","language":"python","source_language":"en","source_url":"https://github.com/cargo-lambda/cargo-lambda","tags":["aws","lambda","cargo","cross-compilation","zig"],"install":[{"cmd":"pip install cargo-lambda","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"The library is installed as a binary, but for development you may import as a Python module","symbol":"cargo_lambda","correct":"import cargo_lambda"}],"quickstart":{"code":"# Build a Lambda function\n!cargo lambda build --release\n\n# Deploy to AWS\n!cargo lambda deploy --iam-role arn:aws:iam::123456789012:role/lambda-role\n\n# Invoke locally\n!cargo lambda invoke --data-file payload.json","lang":"python","description":"Example using the cargo-lambda CLI from a Python environment."},"warnings":[{"fix":"Install Zig (e.g., via brew install zig or download from ziglang.org) and ensure it's in PATH.","message":"cargo-lambda requires Zig for cross-compilation to AWS Lambda's Amazon Linux 2 environment. Without Zig, builds may fail or produce incompatible binaries.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'cargo lambda update --iam-role arn:aws:iam::...' instead of 'deploy' for existing functions.","message":"In v1.8.0, the '--iam-role' flag for 'cargo lambda deploy' changed behavior: it now only sets the role on initial creation, not on subsequent updates. To update an existing function's role, use 'cargo lambda update --iam-role'.","severity":"breaking","affected_versions":">=1.8.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'cargo lambda' from the root of your Rust project (where Cargo.toml is located).","cause":"Running cargo-lambda outside a Rust project with a Cargo.toml.","error":"error: could not find `Cargo.toml` in `/path/to/some/dir` or any parent directory"},{"fix":"Install OpenSSL development packages: 'sudo apt install libssl-dev' on Debian/Ubuntu or 'brew install openssl' on macOS, then rebuild.","cause":"Missing OpenSSL development headers when cross-compiling for Lambda with --features openssl.","error":"error: failed to run custom build command for `openssl-sys v0.9.x`"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}