Skip to content
Discussion options

You must be logged in to vote

Yes, this behavior is expected.

SAM intentionally writes a lot of its diagnostic, progress, and informational output to stderr, not stdout. This includes messages printed during sam build, sam deploy, and related commands.

Why SAM does this:

  • stdout is reserved for machine-readable output (JSON, templates, values that users or scripts may want to capture).
  • stderr is used for:
    • progress logs
    • status messages
    • warnings
    • debug information
    • non-fatal errors

This design allows commands like:

sam deploy --guided --output json > output.json

to work reliably without polluting stdout with human-readable logs.

Is it a bug?

No. It is a deliberate CLI design choice, and SAM follows the same pattern as…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@uldyssian-sh
Comment options

Answer selected by reedham-aws
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants