---
next_cursor: eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6ImNhcmdvLWxhbWJkYSIsInYiOjF9
has_more: false
next: https://sincecutoff.com/v1/changes.md?tool=cargo-lambda&score=0&cursor=eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6ImNhcmdvLWxhbWJkYSIsInYiOjF9
items: 3
---
# sincecutoff.com changes: cargo-lambda

## cargo-lambda build accepts environment variables (cargo-lambda, 2026-02-15)
Published 2026-10-17
- slug: cargo-lambda-build-accepts-environment-variables-7208f8303734
- score: 0.98

How to use it:

When a build needs environment variables, pass them with `--env-var` or load them with `--env-file`; CLI values override metadata, and `--env-var` overrides `--env-file`.

Examples:

```
cargo lambda build --env-var <KEY>=<VALUE>
```

```
cargo lambda build --env-file <PATH>
```

```
[package.metadata.lambda.build]
env_var = ["<KEY>=<VALUE>"]
env_file = "<PATH>"
```

- why_it_matters: Build a project that needs configured environment variables during the cargo build process.
- sources: <https://github.com/cargo-lambda/cargo-lambda/releases/tag/v1.9.0>, <https://github.com/cargo-lambda/cargo-lambda/pull/917>, <https://github.com/cargo-lambda/cargo-lambda/blob/v1.9.0/docs/commands/build.md>
- gotchas: "Version: v1.9.0"; "--env-var <KEY>=<VALUE>: Sets environment variables for the cargo build process. Repeat the flag or give comma-separated pairs."; "--env-file <PATH>: Loads environment variables from a file, one `KEY=VALUE` entry per line."; "env_var: Cargo metadata array of `KEY=VALUE` strings for build-time variables."; "env_file: Cargo metadata path to an environment file for the build."; "Environment files should contain one `KEY=VALUE` entry per line."; "The stated precedence is environment file, then command-line `--env-var`; CLI values override metadata."

## cargo-lambda deploy merges environment variables with --merge-env (cargo-lambda, 2026-02-15)
Published 2026-10-17
- slug: cargo-lambda-deploy-merges-environment-variables-with-merge-env-db814b348311
- score: 0.96

How to use it:

When deploying a function and remote environment variables must be preserved, run `cargo lambda deploy --merge-env` with the function name and the environment variables to add or update. Existing remote variables remain; local values take precedence for duplicates.

Examples:

```
cargo lambda deploy --merge-env --env-var NEW_VAR=VALUE <function-name>
```

```
cargo lambda deploy --merge-env --env-vars FOO=BAR,BAZ=QUX <function-name>
```

```
cargo lambda deploy --merge-env --env-file <path> <function-name>
```

- why_it_matters: Deploy a function while preserving environment variables managed outside Cargo Lambda.
- before: Without `--merge-env`, deployment overwrites existing remote environment variables with the variables specified in configuration.
- sources: <https://github.com/cargo-lambda/cargo-lambda/releases/tag/v1.9.0>, <https://github.com/cargo-lambda/cargo-lambda/pull/910>, <https://github.com/cargo-lambda/cargo-lambda/blob/v1.9.0/docs/commands/deploy.md>
- gotchas: "Version: v1.9.0"; "--merge-env: Preserve existing remote environment variables; variables in local configuration are added or updated, with local values taking precedence for duplicates."; "--env-var KEY=VALUE: Set environment variables using KEY=VALUE. May be repeated; docs say it overrides --env-vars and cannot be combined with it."; "--env-vars KEY=VALUE,...: Set environment variables from a comma-separated list. Cannot be combined with --env-var."; "--env-file <path>: Read environment variables from a file with one KEY=VALUE per line."; "function-name (required): Function name argument for the deploy command."; "merge_env: Cargo.toml deploy metadata boolean; `true` enables merging and the default is `false`."; "Prerequisite: Build the function binary before deploying; deploy fails if it cannot find the binary."; "Prerequisite: AWS account permissions for Lambda operations including `lambda:GetFunction`, `lambda:CreateFunction`, and `lambda:UpdateFunctionCode`; an IAM execution role with Lambda privileges is also required."; "Merging is enabled by the `--merge-env` flag or `merge_env = true`; the configuration default is false."; "When a variable is specified remotely and in configuration, the local value takes precedence."

## cargo-lambda watch processes concurrent invocations (cargo-lambda, 2026-02-15)
Published 2026-10-17
- slug: cargo-lambda-watch-processes-concurrent-invocations-9c1c41b88c7f
- score: 0.98

How to use it:

When you need local Lambda requests processed simultaneously, run `cargo lambda watch --concurrency 5` to allow up to five function instances, spawned on demand. Instances poll a shared queue, remain warm, and each runs with `AWS_LAMBDA_MAX_CONCURRENCY=1`; the limit is global per function.

Examples:

```
cargo lambda watch --concurrency 5
```

- why_it_matters: Run a local Lambda function with multiple requests handled simultaneously.
- before: By default, `cargo lambda watch` processes Lambda invocations sequentially with a single function instance.
- sources: <https://github.com/cargo-lambda/cargo-lambda/releases/tag/v1.9.0>, <https://github.com/cargo-lambda/cargo-lambda/pull/921>, <https://github.com/cargo-lambda/cargo-lambda/blob/v1.9.0/docs/commands/watch.md>
- gotchas: "Version: v1.9.0"; "--concurrency <maximum instances>: Sets the maximum number of function instances; instances are spawned dynamically based on demand. The documentation example uses `5`."; "Prerequisite: Run `cargo lambda watch` at the root of a Rust workspace."; "Concurrency is limited globally per function."; "Each instance runs in single-worker mode with `AWS_LAMBDA_MAX_CONCURRENCY=1`."

Next: https://sincecutoff.com/v1/changes.md?tool=cargo-lambda&score=0&cursor=eyJzY29yZSI6MCwic2VxIjoxOTgzLCJzaW5jZSI6bnVsbCwidG9vbCI6ImNhcmdvLWxhbWJkYSIsInYiOjF9
Save `next_cursor`; next visit, pass it to get only what was published since.
<!-- end of page -->
