Apply an AWS CloudFormation Change Set

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

Apply a known CloudFormation change set to an existing 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 apply the change set to.

Example: my-app-stack

Change Set Name

Octopus.Action.Aws.CloudFormation.ChangeSet.Arn (required)

The name or ARN of the change set to apply to the CloudFormation stack.

Wait for Completion

Octopus.Action.Aws.WaitForCompletion

Wait until the CloudFormation stack has finished applying the change set before finishing the step. Disabling this means the step will not indicate an error if the change set was not applied successfully.

Allowed values: True, False

Default: True

Step configuration using OCL

Example in Octopus Configuration Language (OCL):

step "apply-change-set" {
    name = "Apply Change Set"

    action {
        action_type = "Octopus.AwsApplyCloudFormationChangeSet"
        properties = {
            Octopus.Action.Aws.AssumeRole = "False"
            Octopus.Action.Aws.CloudFormation.ChangeSet.Arn = "#{ChangeSetArn}"
            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