Coder Social home page Coder Social logo

Comments (10)

bgenchel avatar bgenchel commented on May 16, 2024 17

@sanathkr Just upgraded to the most recent version, still running into this issue.

from serverless-application-model.

sanathkr avatar sanathkr commented on May 16, 2024 5

That's a known bug. When you add a default value to a parameter, deploy command doesn't pass it to CloudFormation. Try adding --parameters EnvParameter=prod to the command until this bug is fixed

from serverless-application-model.

 avatar commented on May 16, 2024 3

For me, --parameters didn't work. I used --parameter-overrides. Im fairly new to AWS, so maybe AWS updated? Since this post was from Dec 2016.

Also, I got this issue when updating a stack. I'm on aws-cli 1.15.55, which I believe is the latest version. It worked after I added a --parameter-overrides flag.

from serverless-application-model.

glangston83 avatar glangston83 commented on May 16, 2024 2

That works. The following yaml and CLI command worked for providing the parameters:


Parameters:
EnvParameter:
Type: String
Description: Enter string for environment label of this deployment. Can represent a feature demo env, or a persistent testing environment.

aws cloudformation deploy --template-file template.yaml --stack-name stack2 --parameter-overrides EnvParameter=prod --capabilities CAPABILITY_IAM --profile sandbox

from serverless-application-model.

sanathkr avatar sanathkr commented on May 16, 2024 1

@bgenchel, @sbrickner you are probably running into aws/aws-cli#2599 - which happens when you create stack for very first time.

Until we fix this bug, you can override the parameter explicitly when you add a new parameter with default value. Just once when you first update the stack. Afterwards, UsePreviousValue should work as expected

from serverless-application-model.

chrisoverzero avatar chrisoverzero commented on May 16, 2024 1

@raj-yadav9 It’s difficult to be sure without seeing the Parameters section of the template. That said, the error message indicates that it expects a parameter named subnetIds, but the command is specifying a parameter named SubnetIDs. Also, the value of SubnetIDs has spaces in it, which is probably confusing your shell. I suspect you’d prefer it to look something like this:

'subnetIds=subnet-2ezr3,subnet-0yguft'

from serverless-application-model.

mlabieniec avatar mlabieniec commented on May 16, 2024

Is there any update on when this may be fixed?

from serverless-application-model.

sanathkr avatar sanathkr commented on May 16, 2024

This is already fixed. aws/aws-cli#2360

from serverless-application-model.

sbrickner avatar sbrickner commented on May 16, 2024

This is still an issue. Deploying a SAM template with aws cloudformation deploy throws the following exception:

An error occurred (ValidationError) when calling the CreateChangeSet operation: Cannot specify UsePreviousValue on Parameters when ChangeSetType is CREATE

The suggested fix of adding a default parameter does not work. Is there a work around?

from serverless-application-model.

raj-yadav9 avatar raj-yadav9 commented on May 16, 2024

An error occurred (ValidationError) when calling the CreateChangeSet operation: Parameters: [subnetIds] must have values

my command- aws cloudformation deploy --template-file airflow.yaml --stack-name cloud-dev --parameter-overrides vpcId=123 SubnetIDs=subnet-2ezr3 , subnet-0yguft Env=dev --capabilities CAPABILITY_NAMED_IAM --profile staging

Can anyone help me with this error??

from serverless-application-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.