Thorn Tech Marketing Ad
Skip to main content
Version: Next

Changing the Default Cloud Connection

Overview

By default, StorageLink creates an auto-generated bucket as the initial Cloud Connection on first launch. This guide explains how to configure a custom bucket as the default Cloud Connection at deployment time.

This is accomplished by writing configuration properties to /opt/swiftgw/application.properties before the service starts.

note

This approach applies to AWS CloudFormation deployments. Modify the UserData section of your template before deploying the stack.

Modify the CloudFormation Template

Locate the UserData section of your CloudFormation template and add a write_files block with the following content:

- content : |
features.first-connection.cloud-provider=aws
features.first-connection.name=default
features.first-connection.base-prefix=my-custom-bucket-name
features.first-connection.notes="Initialized from configuration properties."
features.first-connection.region=${AWS::Region}
features.first-connection.use-instance-credentials=true
append: true
path: /opt/swiftgw/application.properties

Restart the Service

Add a service restart command to the runcmd section of your UserData:

sudo service swiftgw-admin-api restart

Configuration Values

PropertyDescription
base-prefixReplace my-custom-bucket-name with your actual bucket name
regionUpdate to match your deployment region
use-instance-credentialsSet to true for IAM role-based authentication
tip

Set BucketAccess=open in your CloudFormation parameters if you are using instance identity with a custom bucket.