CancelUpdateStack - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and reverts to the previous stack configuration.


You can cancel only stacks that are in the UPDATE_IN_PROGRESS state.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


A unique identifier for this CancelUpdateStack request. Specify this token if you plan to retry requests so that Amazon CloudFormation knows that you're not attempting to cancel an update on a stack with the same name. You might retry CancelUpdateStack requests to ensure that Amazon CloudFormation successfully received them.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9][-a-zA-Z0-9]*

Required: No


If you don't pass a parameter to StackName, the API returns a response that describes all resources in the account.

The IAM policy below can be added to IAM policies when you want to limit resource-level permissions and avoid returning a response when no parameter is sent in the request:

{ "Version": "2012-10-17", "Statement": [{ "Effect": "Deny", "Action": "cloudformation:DescribeStacks", "NotResource": "arn:aws:cloudformation:*:*:stack/*/*" }] }

The name or the unique stack ID that's associated with the stack.

Type: String

Required: Yes


For information about the errors that are common to all actions, see Common Errors.


A client request token already exists.

HTTP Status Code: 400



This example illustrates one usage of CancelUpdateStack.

Sample Request ?Action=CancelUpdateStack &StackName=MyStack &Version=2010-05-15 &SignatureVersion=2 &Timestamp=2010-07-27T22%3A26%3A28.000Z &AWSAccessKeyId=[AWS Access KeyID] &Signature=[Signature]

Sample Response

<CancelUpdateStackResponse xmlns=""> <ResponseMetadata> <RequestId>5ccc7dcd-744c-11e5-be70-1b08c228efb3</RequestId> </ResponseMetadata> </CancelUpdateStackResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: