Creating stacks using change sets - AWS CloudFormation

Creating stacks using change sets

To preview how a AWS CloudFormation stack will be configured before creating the stack, create a change set. This functionality allows you to examine various configurations and make corrections and changes to your stack before executing the change set. For more information on change sets, see Updating stacks using change sets.

Creating a change set for a new stack

To create a change set for a new stack, select your stack template and specify the configuration of your stack as you would if you were creating a new stack, then choose to create a new change set rather than a new stack.

To create a change set using the CloudFormation console
  1. Start the Create stack wizard

  2. Select a stack template

  3. Specify parameters for your stack

  4. Set stack options

  5. On the Review page, review the details of your stack.

    If you need to change any of the settings before you create the change set, choose Edit on the appropriate section to go back to the page that has the setting that you want to change.

  6. Choose Create change set.

  7. Enter a name for the change set, and a description if desired. Choose Create change set.

    When you create a change set for a new stack, CloudFormation does the following:

    • Launches a new stack with a status of REVIEW_IN_PROGRESS.

    • Creates a change set for the new stack that reflects the stack configuration you specified in the previous steps.

    CloudFormation displays the Change sets page for the proposed stack. While CloudFormation creates the change set, its status is CREATE_IN_PROGRESS, and its execution status is UNAVAILABLE. When CloudFormation completes successfully creating the change set, it sets the change set status to CREATE_COMPLETE, and its execution status is AVAILABLE. The stack status is updated to REVIEW_IN_PROGRESS. At this point, you can execute the change set to complete creating the new stack.

    In the Changes pane, CloudFormation displays the proposed configuration of your stack.

    If CloudFormation fails to create the change set, it sets the changes set status to CREATE_FAILED. Fix the error displayed in the Status reason field, and then create a new change set. At this stage, you can try various configurations and make corrections and changes to your stack before executing the next change set.

  8. To complete creating a new stack based on the change set, choose Execute, specify your rollback configuration, and then choose Execute change set.