Question:
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:
1 2 |
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:
1 2 |
An error occurred (ValidationError) when calling the CreateChangeSet operation: Stack [test-bucket-xx] does not exist. |
What am I missing here?
Answer:
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 .
1 2 |
--change-set-type CREATE |
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.