Octopus.AwsDeleteCloudFormation exported 2026-07-22 by Octopus Deploy belongs to ‘Aws’ category.
Delete an existing AWS CloudFormation stack.
Parameters
When this step is included in a project’s deployment process, the parameters below can be set.
Use EC2 Instance Role
Octopus.Action.AwsAccount.UseInstanceRole
Execute using the AWS service role for an EC2 instance.
Allowed values: True, False
Default: False
AWS Account
Octopus.Action.AwsAccount.Variable
The AWS account variable to use for authentication.
Assume a Different AWS Service Role
Octopus.Action.Aws.AssumeRole
Whether to assume a different AWS IAM role for executing this step.
Allowed values: True, False
Default: False
Assumed Role ARN
Octopus.Action.Aws.AssumedRoleArn
The Amazon Resource Name (ARN) of the IAM role to assume.
Example: arn:aws:iam::123456789012:role/ExampleRole
Assumed Role Session Name
Octopus.Action.Aws.AssumedRoleSession
A name for the assumed role session. Leave blank to use an automatically generated session name.
Assumed Role Session Duration (seconds)
Octopus.Action.Aws.AssumeRoleSessionDurationSeconds
The duration in seconds for the assumed role session. If blank, defaults to 3600 seconds (1 hour). AWS requires a session duration between 900 seconds (15 minutes) and 43200 seconds (12 hours).
Example: 3600
Assumed Role External ID
Octopus.Action.Aws.AssumeRoleExternalId
An external ID to provide additional security when assuming the role.
Region
Octopus.Action.Aws.Region (required)
The AWS region code where the CloudFormation stack is located.
Example: us-west-2
CloudFormation Stack Name
Octopus.Action.Aws.CloudFormationStackName (required)
The name of the CloudFormation stack to delete.
Example: my-app-stack
Wait for Completion
Octopus.Action.Aws.WaitForCompletion
Wait until the CloudFormation stack has been deleted before finishing the step. Disabling this means the step will not indicate an error if the stack was not removed successfully.
Allowed values: True, False
Default: True
Step configuration using OCL
Example in Octopus Configuration Language (OCL):
step "delete-cloudformation-stack" {
name = "Delete CloudFormation Stack"
action {
action_type = "Octopus.AwsDeleteCloudFormation"
properties = {
Octopus.Action.Aws.AssumeRole = "False"
Octopus.Action.Aws.CloudFormationStackName = "my-stack"
Octopus.Action.Aws.Region = "us-east-1"
Octopus.Action.Aws.WaitForCompletion = "True"
Octopus.Action.AwsAccount.UseInstanceRole = "False"
Octopus.Action.AwsAccount.Variable = "aws-account"
Octopus.Action.RunOnServer = "false"
}
}
} Page updated on Wednesday, July 22, 2026