Use AWS CloudFormation to manage template-defined resource stacks. Create or update stacks, preview changes with change sets, inspect resources and events, and check drift or template validity from a workflow.
Create, update, and delete stacks, preview changes with change sets, describe stacks, list resources, detect drift, view stack events, and retrieve or validate templates. Requires AWS access key and secret access key.
List and describe CloudFormation stacks
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring No Stack name or ID to describe (omit to list all stacks)
Parameter Type Description stacksarray List of CloudFormation stacks with status, outputs, and tags
Create a new CloudFormation stack from a template
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Name for the new stack (must be unique in the Region) templateBodystring Yes The CloudFormation template body (JSON or YAML) parametersjson No Template input parameters (e.g., [{"parameterKey": "InstanceType", "parameterValue": "t3.micro"}]) capabilitiesstring No Comma-separated capabilities to acknowledge (CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND) required when the template creates IAM resources or uses macros tagsjson No Tags to apply to the stack and its resources (e.g., [{"key": "env", "value": "prod"}]) onFailurestring No Action to take on creation failure: ROLLBACK (default), DELETE, or DO_NOTHING timeoutInMinutesnumber No Amount of time before the stack creation times out and rolls back
Parameter Type Description stackIdstring The unique ID of the created stack
Update an existing CloudFormation stack with a new or previous template
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Name or ID of the stack to update templateBodystring No The new CloudFormation template body (JSON or YAML). Required unless usePreviousTemplate is true usePreviousTemplateboolean No Reuse the template currently associated with the stack instead of providing templateBody parametersjson No Template input parameters (e.g., [{"parameterKey": "InstanceType", "parameterValue": "t3.micro"}]) capabilitiesstring No Comma-separated capabilities to acknowledge (CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND) tagsjson No Tags to apply to the stack and its resources (e.g., [{"key": "env", "value": "prod"}])
Parameter Type Description stackIdstring The unique ID of the updated stack
Delete a CloudFormation stack and its resources
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Name or ID of the stack to delete retainResourcesstring No Comma-separated logical resource IDs to retain instead of deleting (only applies to stacks in DELETE_FAILED state)
Parameter Type Description messagestring Operation status message
Cancel an in-progress stack update and roll back to the last known stable state
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Name or ID of the stack whose update should be cancelled
Parameter Type Description messagestring Operation status message
Preview the changes a stack create or update would make before applying them
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Name of the stack to create or update (new name for CREATE type, existing name for UPDATE) changeSetNamestring Yes Name for the new change set templateBodystring No The CloudFormation template body (JSON or YAML). Required unless usePreviousTemplate is true usePreviousTemplateboolean No Reuse the template currently associated with the stack (UPDATE change sets only) parametersjson No Template input parameters (e.g., [{"parameterKey": "InstanceType", "parameterValue": "t3.micro"}]) capabilitiesstring No Comma-separated capabilities to acknowledge (CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND) changeSetTypestring No CREATE (default, new stack), UPDATE (existing stack), or IMPORT (import existing resources) descriptionstring No Description of the change set for reference
Parameter Type Description changeSetIdstring The unique ID of the created change set stackIdstring The unique ID of the target stack
View the resource changes a change set would make and its execution status
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key changeSetNamestring Yes Name or ARN of the change set to describe stackNamestring No Name or ID of the stack the change set belongs to (required if changeSetName is not an ARN)
Parameter Type Description changeSetNamestring Name of the change set changeSetIdstring The unique ID of the change set stackIdstring The unique ID of the target stack stackNamestring Name of the target stack descriptionstring Description of the change set executionStatusstring Whether the change set can be executed (AVAILABLE, UNAVAILABLE, EXECUTE_IN_PROGRESS, EXECUTE_COMPLETE, EXECUTE_FAILED, OBSOLETE) statusstring Current status of the change set (CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_COMPLETE, DELETE_COMPLETE, FAILED) statusReasonstring Reason for the current status, particularly if failed creationTimenumber Timestamp the change set was created capabilitiesarray Capabilities required to execute the change set changesarray List of resource changes (action, logical/physical resource ID, resource type, replacement)
Apply a previously created and reviewed change set to its stack
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key changeSetNamestring Yes Name or ARN of the change set to execute stackNamestring No Name or ID of the stack the change set belongs to (required if changeSetName is not an ARN)
Parameter Type Description messagestring Operation status message
List all resources in a CloudFormation stack
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Stack name or ID
Parameter Type Description resourcesarray List of stack resources with type, status, and drift information
Initiate drift detection on a CloudFormation stack
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Stack name or ID to detect drift on
Parameter Type Description stackDriftDetectionIdstring ID to use with Describe Stack Drift Detection Status to check results
Check the status of a stack drift detection operation
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackDriftDetectionIdstring Yes The drift detection ID returned by Detect Stack Drift
Parameter Type Description stackIdstring The stack ID stackDriftDetectionIdstring The drift detection ID stackDriftStatusstring Drift status (DRIFTED, IN_SYNC, NOT_CHECKED) detectionStatusstring Detection status (DETECTION_IN_PROGRESS, DETECTION_COMPLETE, DETECTION_FAILED) detectionStatusReasonstring Reason if detection failed driftedStackResourceCountnumber Number of resources that have drifted timestampnumber Timestamp of the detection
Get the event history for a CloudFormation stack
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Stack name or ID limitnumber No Maximum number of events to return (default: 50)
Parameter Type Description eventsarray List of stack events with resource status and timestamps
Retrieve the template body for a CloudFormation stack
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key stackNamestring Yes Stack name or ID templateStagestring No Which template version to retrieve: Processed (default, with transforms applied) or Original (as submitted)
Parameter Type Description templateBodystring The template body as a JSON or YAML string stagesAvailablearray Available template stages
Get a summary of a template or deployed stack: resource types, required capabilities, and parameters, without full validation
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key templateBodystring No The CloudFormation template body (JSON or YAML). Required if stackName is not provided stackNamestring No Name or ID of a deployed stack to summarize instead of a template body
Parameter Type Description descriptionstring Template description parametersarray Template parameters with types, defaults, and descriptions capabilitiesarray Required capabilities (e.g., CAPABILITY_IAM) capabilitiesReasonstring Reason capabilities are required resourceTypesarray AWS resource types declared in the template (e.g., AWS::S3::Bucket) versionstring Template format version declaredTransformsarray Transforms used in the template (e.g., AWS::Serverless-2016-10-31)
Validate a CloudFormation template for syntax and structural correctness
Inputs and outputsParameter Type Required Description awsRegionstring Yes AWS region (e.g., us-east-1) awsAccessKeyIdstring Yes AWS access key ID awsSecretAccessKeystring Yes AWS secret access key templateBodystring Yes The CloudFormation template body (JSON or YAML)
Parameter Type Description descriptionstring Template description parametersarray Template parameters with defaults and descriptions capabilitiesarray Required capabilities (e.g., CAPABILITY_IAM) capabilitiesReasonstring Reason capabilities are required declaredTransformsarray Transforms used in the template (e.g., AWS::Serverless-2016-10-31)