Upload a package to an AWS S3 bucket

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

Upload a package or specific files within a package to an AWS S3 bucket.

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

Bucket

Octopus.Action.Aws.S3.BucketName (required)

The name of the S3 bucket to upload to.

Example: my-deployment-bucket

Package ID

Octopus.Action.Package.PackageId (required)

The ID of the package to upload.

Feed

Octopus.Action.Package.FeedId (required)

The feed that contains the package to upload.

Target Mode

Octopus.Action.Aws.S3.TargetMode

Choose how the package should be uploaded: as an entire package file or as specific file(s) within the package.

Allowed values: EntirePackage, FileSelections

Default: EntirePackage

Package Options

Octopus.Action.Aws.S3.PackageOptions

A JSON object specifying options for uploading the entire package including bucket key behaviour, storage class, canned ACL, tags, and metadata.

File Selections

Octopus.Action.Aws.S3.FileSelections

A JSON array of file selection configurations specifying which files to upload, their bucket key settings, storage class, canned ACL, tags, and metadata. Each selection can target a single file or multiple files via patterns.

Step configuration using OCL

Example in Octopus Configuration Language (OCL):

step "upload-to-s3" {
    name = "Upload to S3"

    action {
        action_type = "Octopus.AwsUploadS3"
        properties = {
            Octopus.Action.Aws.AssumeRole = "False"
            Octopus.Action.Aws.Region = "us-east-1"
            Octopus.Action.Aws.S3.BucketName = "my-bucket"
            Octopus.Action.Aws.S3.PackageOptions = "{\"bucketKeyBehaviour\":\"Filename\",\"bucketKeyPrefix\":\"releases/\",\"storageClass\":\"STANDARD\",\"cannedAcl\":\"private\",\"metadata\":[],\"tags\":[],\"variableSubstitutionPatterns\":\"\",\"structuredVariableSubstitutionPatterns\":\"\"}"
            Octopus.Action.Aws.S3.TargetMode = "EntirePackage"
            Octopus.Action.AwsAccount.UseInstanceRole = "False"
            Octopus.Action.AwsAccount.Variable = "aws-account"
            Octopus.Action.Package.DownloadOnTentacle = "False"
            Octopus.Action.Package.FeedId = "octopus-server-built-in"
            Octopus.Action.Package.PackageId = "MyApp"
            Octopus.Action.RunOnServer = "false"
        }

        packages {
            acquisition_location = "Server"
            feed = "octopus-server-built-in"
            package_id = "MyApp"
        }
    }
}

Page updated on Wednesday, July 22, 2026