Use these actions to inspect stack status and resources, detect configuration drift, review change sets, and remediate stuck stacks directly from a workflow.
Prerequisites
For prerequisites and credentials setup, see Set up AWS credentials.
All CloudFormation actions accept the same auth inputs. Use awsRoleArn (recommended) or the access key pair (awsAccessKeyId and awsSecretAccessKey).
중요
CloudFormation actions currently support only the us-east-1 region.
팁
The three stuck-stack remediation actions (cancelUpdateStack, continueUpdateRollback, rollbackStack) change stack state. We recommend using a separate, narrowly scoped IAM role for these actions rather than the read-only role you use for status and inspection actions. See the IAM permissions section below.
Shared inputs
The following inputs apply to all CloudFormation actions. Use awsRoleArn (recommended) or the access key pair.
| Input | Type | Description |
|---|---|---|
awsRoleArn | String | IAM role ARN to assume for this call. |
awsAccessKeyId | String | AWS access key ID. Pass as a secret. |
awsSecretAccessKey | String | AWS secret access key. Pass as a secret. |
awsSessionToken | String | Temporary session token for STS authentication. Pass as a secret. |
selectors | List | JQ selectors to extract specific fields from the action output. |
IAM permissions
Each action requires a single CloudFormation permission matching its API name. The following table lists the required permission for each action.
Action | Required IAM permission | Additional permissions |
|---|---|---|
|
| None |
|
|
|
|
|
|
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
We recommend two separate roles: a read-only role covering the 15 describe/list/get/detect actions, and a state-changing role scoped to cancelUpdateStack, continueUpdateRollback, and rollbackStack. Use the awsRoleArn input per step to switch between them in a single workflow.
Cancel an in-progress stack update
Action identifier: aws.cloudformation.cancelUpdateStack
Cancels an in-progress UPDATE_IN_PROGRESS update on a CloudFormation stack. Asynchronous — returns as soon as CloudFormation accepts the cancel request, not when the cancellation completes. Use aws.cloudformation.describeStacks to poll for UPDATE_ROLLBACK_COMPLETE or UPDATE_ROLLBACK_FAILED.
중요
Call aws.cloudformation.describeStacks first to confirm the stack is actually in UPDATE_IN_PROGRESS. Canceling a stack that is not in that state returns an error.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Optional. Idempotency token for this request. If you submit the same token twice, CloudFormation treats the second call as a duplicate and does not re-execute the action. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the cancel_update_stack Boto3 reference. Returns an empty object on success. |
| Boolean |
|
| String | Error message on failure. |
name: cancel-stack-updatedescription: Confirm a stack is UPDATE_IN_PROGRESS and cancel the updatesteps: - name: checkStatus type: action action: aws.cloudformation.describeStacks version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: stackStatus expression: ".response.Stacks[0].StackStatus" - name: isUpdateInProgress type: switch switch: - condition: ${{ .steps.checkStatus.outputs.stackStatus == "UPDATE_IN_PROGRESS" }} next: cancelUpdate next: end - name: cancelUpdate type: action action: aws.cloudformation.cancelUpdateStack version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack next: endContinue an update rollback
Action identifier: aws.cloudformation.continueUpdateRollback
Retries the rollback for a stack in UPDATE_ROLLBACK_FAILED state, either for all resources or for a subset you specify. If specific resources are blocking the rollback, use resourcesToSkip to skip them and let the remaining resources complete.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Optional. ARN of an IAM role for CloudFormation to use during the rollback. This is the role CloudFormation assumes, not the role used to call the API. Setting this input requires |
|
| List | Optional. Logical resource IDs to skip during rollback. Use when specific resources cannot be rolled back and are blocking the rest of the rollback. |
|
| String | Optional. Idempotency token for this request. If you submit the same token twice, CloudFormation treats the second call as a duplicate and does not re-execute the action. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the continue_update_rollback Boto3 reference. Returns an empty object on success. |
| Boolean |
|
| String | Error message on failure. |
name: continue-stack-rollbackdescription: Continue rollback for a stack in UPDATE_ROLLBACK_FAILEDsteps: - name: continueRollback type: action action: aws.cloudformation.continueUpdateRollback version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack next: endRoll back a stack
Action identifier: aws.cloudformation.rollbackStack
Rolls back an AWS CloudFormation stack to its last known stable state. Use this for stacks stuck in an indeterminate state that cannot be recovered through continueUpdateRollback.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Optional. ARN of an IAM role for CloudFormation to use during the rollback. This is the role CloudFormation assumes, not the role used to call the API. Setting this input requires |
|
| String | Optional. Idempotency token for this request. If you submit the same token twice, CloudFormation treats the second call as a duplicate and does not re-execute the action. |
|
| Boolean | Optional. If |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the rollback_stack Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: rollback-stackdescription: Roll back a CloudFormation stack to its last stable statesteps: - name: rollbackStack type: action action: aws.cloudformation.rollbackStack version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: operationId expression: ".response.OperationId" next: endDescribe stacks
Action identifier: aws.cloudformation.describeStacks
Returns summary and configuration information for one or more AWS CloudFormation stacks. Omit stackName to list all stacks in the region. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region to query. |
|
| String | Optional. Stack name or stack ID. Omit to return all stacks in the region. |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the describe_stacks Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-cloudformation-stackdescription: Get the status of a CloudFormation stacksteps: - name: describeStack type: action action: aws.cloudformation.describeStacks version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: stackStatus expression: ".response.Stacks[0].StackStatus" next: endDescribe stack events
Action identifier: aws.cloudformation.describeStackEvents
Returns all events for a specified AWS CloudFormation stack. Returns events in reverse chronological order (most recent first). The response is paginated — use nextToken from the previous response to retrieve earlier events.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the describe_stack_events Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: get-stack-eventsdescription: Retrieve recent events for a CloudFormation stacksteps: - name: describeStackEvents type: action action: aws.cloudformation.describeStackEvents version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: events expression: ".response.StackEvents" next: endDescribe stack resources
Action identifier: aws.cloudformation.describeStackResources
Returns a list of all resources in a specified AWS CloudFormation stack. You can filter by logicalResourceId. Provide either stackName or physicalResourceId — at least one is required.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Conditionally required. Stack name or stack ID. Required if |
|
| String | Conditionally required. Physical ID of the resource (for example, an EC2 instance ID). Required if |
|
| String | Optional. Logical resource ID (template name) to filter results to a single resource. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the describe_stack_resources Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: get-stack-resourcesdescription: List all resources in a CloudFormation stacksteps: - name: describeStackResources type: action action: aws.cloudformation.describeStackResources version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: resources expression: ".response.StackResources" next: endDescribe a stack resource
Action identifier: aws.cloudformation.describeStackResource
Returns detailed information for a single resource in an AWS CloudFormation stack, identified by its logical resource ID.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Required. Logical resource ID of the resource to describe (the resource's name in the CloudFormation template). |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the describe_stack_resource Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-stack-resourcedescription: Get the status of a specific resource in a CloudFormation stacksteps: - name: describeStackResource type: action action: aws.cloudformation.describeStackResource version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack logicalResourceId: MyEC2Instance selectors: - name: resourceStatus expression: ".response.StackResourceDetail.ResourceStatus" next: endList stacks
Action identifier: aws.cloudformation.listStacks
Returns summary information for AWS CloudFormation stacks in the account and region. Unlike describeStacks, this action also returns deleted stacks and supports filtering by stack status. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region to query. |
|
| List | Optional. Filter results by one or more stack statuses (for example, |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the list_stacks Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-failed-stacksdescription: List CloudFormation stacks in a failed rollback statesteps: - name: listFailedStacks type: action action: aws.cloudformation.listStacks version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackStatusFilter: - UPDATE_ROLLBACK_FAILED - CREATE_FAILED selectors: - name: stacks expression: ".response.StackSummaries" next: endList stack resources
Action identifier: aws.cloudformation.listStackResources
Returns summary information about all resources in an AWS CloudFormation stack. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the list_stack_resources Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-stack-resourcesdescription: List all resources in a CloudFormation stacksteps: - name: listStackResources type: action action: aws.cloudformation.listStackResources version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: resources expression: ".response.StackResourceSummaries" next: endGet a stack template
Action identifier: aws.cloudformation.getTemplate
Returns the AWS CloudFormation template body for a stack or change set. Use templateStage to retrieve the original user-submitted template or the processed template after CloudFormation transforms have been applied.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Optional. Stack name or stack ID. Required if |
|
| String | Optional. Change set name or ARN. Use to retrieve the template for a specific change set rather than the deployed stack. |
|
| String | Optional. Which version of the template to return. Allowed values: |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the get_template Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: get-stack-templatedescription: Retrieve the template body for a CloudFormation stacksteps: - name: getTemplate type: action action: aws.cloudformation.getTemplate version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack templateStage: Original selectors: - name: templateBody expression: ".response.TemplateBody" next: endDetect stack drift
Action identifier: aws.cloudformation.detectStackDrift
Starts a drift detection operation on a CloudFormation stack and returns a StackDriftDetectionId. Asynchronous — returns immediately after CloudFormation accepts the request. Use aws.cloudformation.describeStackDriftDetectionStatus with the StackDriftDetectionId to poll until DetectionStatus reaches DETECTION_COMPLETE or DETECTION_FAILED.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| List | Optional. Filter drift detection to specific logical resource IDs. Omit to detect drift on all supported resources in the stack. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the detect_stack_drift Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: detect-stack-driftdescription: Start drift detection on a stack and poll until it completessteps: - name: startDriftDetection type: action action: aws.cloudformation.detectStackDrift version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: driftDetectionId expression: ".response.StackDriftDetectionId" - name: waitForDetection type: wait seconds: 15 - name: checkDriftStatus type: action action: aws.cloudformation.describeStackDriftDetectionStatus version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackDriftDetectionId: ${{ .steps.startDriftDetection.outputs.driftDetectionId }} selectors: - name: detectionStatus expression: ".response.DetectionStatus" - name: stackDriftStatus expression: ".response.StackDriftStatus" - name: isDriftDetectionDone type: switch switch: - condition: ${{ .steps.checkDriftStatus.outputs.detectionStatus == "DETECTION_COMPLETE" or .steps.checkDriftStatus.outputs.detectionStatus == "DETECTION_FAILED" }} next: end next: waitForDetectionDescribe stack drift detection status
Action identifier: aws.cloudformation.describeStackDriftDetectionStatus
Returns the status of an AWS CloudFormation drift detection operation started by aws.cloudformation.detectStackDrift. Poll this action with the StackDriftDetectionId until DetectionStatus is DETECTION_COMPLETE or DETECTION_FAILED.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Drift detection operation ID returned by |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the describe_stack_drift_detection_status Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: check-drift-detection-statusdescription: Check the status of a CloudFormation drift detection operationsteps: - name: checkDriftStatus type: action action: aws.cloudformation.describeStackDriftDetectionStatus version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackDriftDetectionId: 3f451a7b-0f41-4a8b-a3f5-example selectors: - name: detectionStatus expression: ".response.DetectionStatus" - name: stackDriftStatus expression: ".response.StackDriftStatus" next: endDetect stack resource drift
Action identifier: aws.cloudformation.detectStackResourceDrift
Returns drift information for a single resource in a CloudFormation stack. Unlike detectStackDrift, runs synchronously and returns the result directly. Use it to check drift on a specific resource without triggering full-stack detection.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Required. Logical resource ID of the resource to check for drift. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the detect_stack_resource_drift Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: detect-resource-driftdescription: Check a single CloudFormation resource for configuration driftsteps: - name: detectResourceDrift type: action action: aws.cloudformation.detectStackResourceDrift version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack logicalResourceId: MyBucket selectors: - name: driftStatus expression: ".response.StackResourceDrift.StackResourceDriftStatus" - name: propertyDifferences expression: ".response.StackResourceDrift.PropertyDifferences" next: endDescribe a change set
Action identifier: aws.cloudformation.describeChangeSet
Returns the properties of an AWS CloudFormation change set. If the change set has more than one page of changes, use nextToken to paginate through the full list.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Change set name or ARN. If you provide a name rather than an ARN, you must also provide |
|
| String | Optional. Stack name or stack ID. Required when |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
| Boolean | Optional. If |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the describe_change_set Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-change-setdescription: Review the changes in a CloudFormation change setsteps: - name: describeChangeSet type: action action: aws.cloudformation.describeChangeSet version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 changeSetName: my-change-set stackName: my-app-stack selectors: - name: changes expression: ".response.Changes" - name: status expression: ".response.Status" next: endList change sets
Action identifier: aws.cloudformation.listChangeSets
Returns a list of all change sets associated with an AWS CloudFormation stack. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the list_change_sets Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-stack-change-setsdescription: List all change sets for a CloudFormation stacksteps: - name: listChangeSets type: action action: aws.cloudformation.listChangeSets version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: changeSets expression: ".response.Summaries" next: endGet a stack policy
Action identifier: aws.cloudformation.getStackPolicy
Returns the stack policy for a specified AWS CloudFormation stack. If the stack has no policy, response.StackPolicyBody is empty.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region of the target stack. |
|
| String | Required. Stack name or stack ID. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the get_stack_policy Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: get-stack-policydescription: Retrieve the stack policy for a CloudFormation stacksteps: - name: getStackPolicy type: action action: aws.cloudformation.getStackPolicy version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 stackName: my-app-stack selectors: - name: stackPolicy expression: ".response.StackPolicyBody" next: endList exports
Action identifier: aws.cloudformation.listExports
Returns a list of all exported output values across all AWS CloudFormation stacks in the account and region. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region to query. |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the list_exports Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-stack-exportsdescription: List all CloudFormation cross-stack exports in a regionsteps: - name: listExports type: action action: aws.cloudformation.listExports version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 selectors: - name: exports expression: ".response.Exports" next: endList imports
Action identifier: aws.cloudformation.listImports
Returns a list of AWS CloudFormation stacks that import a specified export. Use this to identify which stacks depend on a given exported value before making changes. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description | Example |
|---|---|---|---|
| String | Required. AWS region to query. |
|
| String | Required. Name of the exported output value to look up. |
|
| String | Optional. Pagination token from a previous response. Leave empty on the initial request. |
|
For auth and selector inputs, see Prerequisites.
Output | Type | Example |
|---|---|---|
| Object | See the list_imports Boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-export-consumersdescription: Find all stacks that import a CloudFormation exported valuesteps: - name: listImports type: action action: aws.cloudformation.listImports version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 exportName: SharedVpcId selectors: - name: imports expression: ".response.Imports" next: end