sam local disables hot reload with --no-watch
Introduced 2026-06-10 · score 0.97
HOW TO USE IT
When file changes should not trigger hot reload during a local API workflow, run `sam local start-api --warm-containers eager --no-watch`. With `--no-watch`, code and template changes are not detected automatically; stop and rerun the command to pick them up.
sam local start-api --warm-containers eager --no-watchWHY THIS HELPS
Run a local SAM workflow without hot reload when file changes should not trigger reloads.
BEFORE THIS CHANGE
Without `--no-watch`, `sam local start-api` automatically detects changes and reflects them; when using warm containers, detected code changes shut down the function container and it is recreated on the next invocation.
REQUIREMENTS AND LIMITATIONS
- Version: v1.162.0
- --warm-containers eager: Loads containers for all functions at startup and keeps them between invocations.
- --no-watch: Disables file watching; code and template changes are not detected automatically.
- Prerequisite: Install the AWS SAM CLI and complete AWS SAM prerequisites.
- Prerequisite: Run from the project root; local API execution uses Docker containers.
FIRST-PARTY EVIDENCE
- https://github.com/aws/aws-sam-cli/releases/tag/v1.162.0
- https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli-local-start-api.html
Check the installed version and the source before using it. Entry JSON