Skip to content

sam deploy is showing parameters with NoEcho: true #2210

@kstro21

Description

@kstro21

Description

If I add a parameter to my template and set the NoEcho option to true, then, when I run sam deploy with --parameter-overrides I can see the value of the parameter in the command output.

Steps to reproduce

  1. Add a parameter with NoEcho: true
    MyParam:
       Type: String
       Description: My description
       NoEcho: true
  2. Invoke sam deploy like this:
    sam deploy --stack-name my-stack --parameter-overrides MyParam=$SOME_ENV_VAR \
     --region $AWS_REGION --s3-bucket $FZ_BUCKET_NAME \
     --s3-prefix my-app-prefix --capabilities CAPABILITY_IAM --force-upload

Observed result

Deploying with following values
--
253 | ===============================
254 | Stack name                 : my-stack
255 | Region                     : us-east-1
256 | Confirm changeset          : False
257 | Deployment s3 bucket       : my-bucket
258 | Capabilities               : ["CAPABILITY_IAM"]
259 | Parameter overrides        : {'MyParam': 'ShouldntSeeThis'}

Expected result

I shouldn't see parameters with NoEcho: true in the cli output. It is ok if I'm local, but I don't want those values in my CI/CD pipeline's log

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

  1. sam --version: 1.2.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions