How to create new stack using create-change-set in AWS Cloudformation

0 votes

I'm able to use change-sets on an existing AWS stack. I read this doc and it seems it's also possible to create a change set for a new stack.

Now I try to do it using the CLI:

aws cloudformation create-change-set --change-set-name ChangeSet-82 --stack-name test-bucket-xx --region eu-west-1 --template-body file://xxx

This returns an error:

An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack [test-bucket-xx] does not exist.

What am I missing here?

Sep 18, 2018 in AWS by bug_seeker
• 15,310 points
227 views

1 answer to this question.

0 votes

The type of change set operation. To create a change set for a new stack, specify CREATE. To create a change set for an existing stack, specify UPDATE .

--change-set-type CREATE

Source

To create a change set for a stack that doesn't exist, for the change-set-type parameter, specify CREATE . To create a change set for an existing stack, specify UPDATE for the change-set-type parameter. After the create-change-set call successfully completes, AWS CloudFormation starts creating the change set. To check the status of the change set or to review it, use the describe-change-set action.

answered Sep 18, 2018 by Priyaj
• 56,160 points

Related Questions In AWS

0 votes
1 answer

How to provide tags for the stack in CloudFormation Template?

In the template anatomy, you cant set ...READ MORE

answered Aug 13, 2018 in AWS by bug_seeker
• 15,310 points
2,781 views
0 votes
1 answer

How to set-up DynamoDB trigger using AWS Lambda?

Well this code worked for me. You ...READ MORE

answered Aug 20, 2018 in AWS by Archana
• 4,090 points
443 views
0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,090 points
2,339 views
0 votes
1 answer

How to set up AWS credentials in AWS Powershell?

First, of all the tools installed to ...READ MORE

answered Nov 22, 2018 in AWS by Archana
• 5,480 points
305 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to create a CloudFormation only AWS policy

The easiest way to achieve what you're ...READ MORE

answered Sep 26, 2018 in AWS by Priyaj
• 56,160 points
100 views