Deploy an AWS CloudFormation template

Octopus.AwsRunCloudFormation exported 2026-07-22 by Octopus Deploy belongs to ‘Aws’ category.

Deploy an AWS CloudFormation template to create or update a 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 default AWS region code for this step.

Example: us-west-2

CloudFormation Stack Name

Octopus.Action.Aws.CloudFormationStackName (required)

The name of the CloudFormation stack to create or update.

Example: my-app-stack

Role ARN

Octopus.Action.Aws.CloudFormation.RoleArn

The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation assumes when executing any operations. This role will be used for any future operations on the stack.

Example: arn:aws:iam::123456789012:role/CloudFormationRole

IAM Capabilities

Octopus.Action.Aws.IamCapabilities

Additional capabilities required for templates that have IAM resources or named IAM resources. Specified as a JSON array.

Allowed values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPAND

Example: ["CAPABILITY_IAM","CAPABILITY_NAMED_IAM"]

Tags

Octopus.Action.Aws.CloudFormation.Tags

Stack-level tags to be propagated to resources that CloudFormation supports. Specified as a JSON array of key-value pairs. If no tags are specified and the stack already exists, current tags will be preserved.

Example: [{"key":"Environment","value":"Production"}]

Disable Rollback

Octopus.Action.Aws.DisableRollback

Disable the automatic rollback of a CloudFormation stack if it failed to be created successfully. This has no effect if the stack exists and is being updated.

Allowed values: True, False

Default: False

Wait for Completion

Octopus.Action.Aws.WaitForCompletion

Wait until the CloudFormation stack operation has completed before finishing the step. Disabling this means output variables may not be created or may contain outdated values, and the step will not report errors if the stack was rolled back.

Allowed values: True, False

Default: True

Template Source

Octopus.Action.Aws.TemplateSource (required)

The source of the CloudFormation template. Templates can be entered as source code, contained in a package, a Git repository, or referenced by S3 URL.

Allowed values: Inline, Package, S3URL, GitRepository

Default: Inline

CloudFormation Template

Octopus.Action.Aws.CloudFormationTemplate

The CloudFormation template content (when source is Inline) or the relative path to the template file in the package or Git repository.

Template Parameters

Octopus.Action.Aws.CloudFormationTemplateParametersRaw

The CloudFormation template parameters as a JSON array of ParameterKey/ParameterValue pairs, or the relative path to the parameters file when using a package or Git repository source.

Example: [{"ParameterKey":"InstanceType","ParameterValue":"t2.micro"}]

Template S3 URL

Octopus.Action.Aws.CloudFormationTemplateS3URL

The S3 URL to the CloudFormation template. Templates hosted in S3 are not processed by Octopus and cannot use variable substitutions.

Example: https://s3.amazonaws.com/mybucket/mytemplate.yml

Parameters S3 URL

Octopus.Action.Aws.CloudFormationParametersS3URL

The S3 URL to the CloudFormation parameters file. Parameter files hosted in S3 are downloaded and processed during deployment and can use variable substitutions.

Example: https://s3.amazonaws.com/mybucket/myparams.json

Generate Change Set Name

Octopus.Action.Aws.CloudFormation.ChangeSet.GenerateName

Whether to automatically generate a unique change set name or manually specify one. Only applies when CloudFormation change sets are enabled.

Allowed values: True, False

Default: True

Change Set Name

Octopus.Action.Aws.CloudFormation.ChangeSet.Name

The name of the change set. Change set names must be unique for a given stack. Only applies when change sets are enabled and automatic name generation is disabled.

Defer Change Set Execution

Octopus.Action.Aws.CloudFormation.ChangeSet.Defer

Whether to defer change set execution or execute it immediately. Only applies when change sets are enabled.

Allowed values: True, False

Default: False

Optional features

Enable features by adding their IDs to Octopus.Action.EnabledFeatures (a comma-separated list).

CloudFormation Change Sets Octopus.Features.CloudFormation.ChangeSet.Feature

Use CloudFormation change sets when updating or creating stacks.

Octopus.Action.Aws.CloudFormation.ChangeSet.GenerateName

Octopus.Action.Aws.CloudFormation.ChangeSet.GenerateName

Automatically generate a change set name (True) or specify manually (False).

Allowed values: True, False

Change Set Name

Octopus.Action.Aws.CloudFormation.ChangeSet.Name

Change set name when GenerateName is False. Must be unique for a given stack.

Octopus.Action.Aws.CloudFormation.ChangeSet.Defer

Octopus.Action.Aws.CloudFormation.ChangeSet.Defer

Defer change set execution (True) or execute immediately (False).

Allowed values: True, False

Step configuration using OCL

Example in Octopus Configuration Language (OCL):

step "deploy-cloudformation" {
    name = "Deploy CloudFormation"

    action {
        action_type = "Octopus.AwsRunCloudFormation"
        properties = {
            Octopus.Action.Aws.AssumeRole = "False"
            Octopus.Action.Aws.CloudFormationStackName = "my-stack"
            Octopus.Action.Aws.CloudFormationTemplate = "{\"AWSTemplateFormatVersion\":\"2010-09-09\",\"Resources\":{}}"
            Octopus.Action.Aws.DisableRollback = "False"
            Octopus.Action.Aws.Region = "us-east-1"
            Octopus.Action.Aws.TemplateSource = "Inline"
            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