Execute a change set for a CloudFormation stack
To make the changes described in a change set to your stack, execute the change set.
Important
After you execute a change set, CloudFormation deletes any additional change sets that are associated with the stack because they're no longer valid for the updated stack. If an update fails, you need to create a new change set.
Note
If the change set was created with express mode
(--deployment-config '{"mode": "EXPRESS"}'), CloudFormation applies express mode
when you execute the change set. Express mode completes resource operations as soon as
configuration is applied, without waiting for full stabilization. For more information, see
Express mode.
Stack policies and executing a change set
If you execute a change set on a stack that has a stack policy associated with it, CloudFormation enforces the policy when it updates the stack. You can't specify a temporary stack policy that overrides the existing policy when you execute a change set. To update a protected resource, you must update the stack policy or use the direct update method. For more information, see Update stacks directly.
To execute a change set (AWS CLI)
-
Run the execute-change-set command.
Specify the change set ID of the change set that you want to execute, as shown in the following example:
aws cloudformation execute-change-set \ --change-set-name \arn:aws:cloudformation:us-east-1:123456789012:changeSet/SampleChangeSet/1a2345b6-0000-00a0-a123-00abc0abc000The command in the example executes a change set with the ID
arn:aws:cloudformation:us-east-1:123456789012:changeSet/SampleChangeSet/1a2345b6-0000-00a0-a123-00abc0abc000.After you run the command, CloudFormation starts updating the stack. To view the stack's progress, use the describe-stacks command.