Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 450
DenCowboy Avatar asked Mar 27 '18 13:03

DenCowboy


1 Answers

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.

like image 139
Sudharsan Sivasankaran Avatar answered Oct 12 '22 13:10

Sudharsan Sivasankaran