Skip to content

Bug: sam deploy with invalid samconfig file #8412

@brahim-lqati

Description

@brahim-lqati

Description:

When users incorrectly define parameter_overrides or tags in the samconfig.toml file, the sam deploy command does not display any error message.
Instead, the deployment process hangs indefinitely without feedback, making it difficult to identify the issue.

Example:

tags = [
    "Environment:dev",
]

In this example, the error is caused by using : instead of =.
The deployment should fail immediately with a clear error message, but instead, it hangs silently.

Steps to reproduce:

Create a standard SAM project.

Modify the samconfig.toml file to include a syntax error in either tags or parameter_overrides (for example, use : instead of =).

Run the command:
sam deploy ...

Observed result:

The deployment process hangs indefinitely without showing any error message.

Expected result:

The SAM CLI should validate the samconfig.toml file before deployment and return a clear error message when a syntax issue is detected.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. Os: Linux
  2. sam --version: 1.120.0
  3. AWS region: eu-west-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    stage/needs-triageAutomatically applied to new issues and PRs, indicating they haven't been looked at.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions