Skip to content

feat: add --no-reload flag to disable hot reload for local commands#58

Open
cortex-assistant[bot] wants to merge 1 commit into
developfrom
fix/no-reload-flag
Open

feat: add --no-reload flag to disable hot reload for local commands#58
cortex-assistant[bot] wants to merge 1 commit into
developfrom
fix/no-reload-flag

Conversation

@cortex-assistant

Copy link
Copy Markdown

Fixes #57.

Adds a new --no-reload flag to sam local start-api and sam local start-lambda commands that disables the file watcher/hot reload when used with --warm-containers. This addresses the significant performance issue on Windows where Microsoft Defender scanning causes the watchdog-based file observer to take 2-5 minutes to initialize.

Changes:

  • Added --no-reload CLI option in options.py
  • Wired the option through start-api and start-lambda CLI commands
  • Plumbed through InvokeContext to WarmLambdaRuntime
  • Made LambdaFunctionObserver creation conditional in WarmLambdaRuntime via a _NoOpObserver
  • Added tests for the new flag

@Stevoni

Stevoni commented Apr 6, 2026

Copy link
Copy Markdown

Hey there, I'm looking forward to this, do you know if this mergable into the main SAM repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: SAM Local Flag to Disable Hot Reload

1 participant