Prerequisites

You need an active AWS account and an S3 bucket for integration. Ensure that you have already created the required S3 bucket in your account before proceeding with the following steps.

Steps

  1. Enter your bucket name in CloudFiles
    • Open the CloudFiles app in Salesforce and navigate to Document Management > Libraries. Click on AWS S3. (If you do not see the AWS S3 option, click Manage Libraries and add it first)
    • Click Connect, enter your S3 bucket name, and continue.
  2. Download the CloudFormation template
    • Note down the External ID shown on screen, then download the CloudFormation template that is generated.
    • Head over to the AWS Management Console after this step.
  3. Access AWS CloudFormation
    • In the AWS Management Console, search for and select 'CloudFormation'.
  4. Create a New Stack
    • Click on “Create stack” and select “With new resources (standard)”.
    • Choose “Template is ready” under the “Prepare template” options.
  5. Upload the CloudFormation Template
    • Select “Upload a template file”.
    • Click on “Choose file” and upload the CloudFormation template you downloaded in step 2.
    • Click “Next”.
  6. Specify Stack Details
    • Enter a name for your stack. For example, “CloudFilesS3Integration”.
    • Fill in any parameters required by the template, if applicable.
    • Click “Next”.
  7. Configure Stack Options (Optional)
    • Configure any additional options like tags or permissions if necessary.
    • Click “Next”.
  8. Review and Create the Stack
    • Review all settings and details. Make sure everything is correct.
    • Acknowledge that AWS CloudFormation might create IAM resources.
    • Click “Create stack”.
  9. Wait for Stack Creation
    • The stack creation process might take a few minutes. Wait until the status changes to “CREATE_COMPLETE”.
  10. Obtain the Outputs
    • Once the stack creation is complete, go to the “Outputs” tab of your stack.
    • Note down the ‘Role ARN’ values. This is essential for connecting your S3 bucket to CloudFiles.
  11. Enter Details in CloudFiles
    • Log into your CloudFiles account.
    • Navigate to the S3 bucket integration section.
    • Enter the ‘Role ARN’ you noted down earlier. Also enter the following fields.
    • Prefix (optional): This defines the folder path within your S3 bucket that CloudFiles will use. This lets you organise data within a specific section of the bucket rather than the entire bucket. When connecting a bucket for the first time, you can use any prefix. If you reuse an existing bucket in another org, each connection must use a unique, non-overlapping prefix to prevent conflicts — for example, team-a/ and team-b/ are valid, but team-a/ and team-a/subfolder/ are not.
    • Drive label: The display name for this storage connection in CloudFiles. This is what users will see when accessing or selecting a storage location. It is optional for the first bucket connected in your org but required for any additional connections.
    • Save your settings.

Note

A prefix is mandatory every time you connect the same bucket more than once, whether within the same org or across different orgs — this ensures paths do not overlap. If you are connecting the same bucket a second time within the same org, both the original and the new connection must have a prefix, so if the first connection was made without one, disconnect it and reconnect with a prefix before adding the second.

A drive label is mandatory from the second bucket onward within the same org, regardless of whether the buckets are the same or different.

After entering the details in CloudFiles, your S3 bucket should now be successfully connected to your CloudFiles account. You can start managing and accessing your S3 files directly through CloudFiles.

NoteIf a bucket is already connected, you will see a 'Reuse Existing Connection' option at this stage and can connect the same bucket again using a different, non-overlapping prefix.

  1. Enable sync (optional)
    • Toggle on Enable Sync to automatically reflect changes from your S3 bucket in CloudFiles.
    • Once enabled, any files or folders uploaded, updated, or deleted in S3 will appear in CloudFiles.

Note

Sync only applies to changes made after the toggle is enabled. Existing files in your S3 bucket will not appear automatically in CloudFiles. To make historical data available, a custom migration is required — contact support@cloudfiles.io for details.

If your S3 bucket was connected before the automated sync setup was introduced, enabling sync may require updating the IAM role permissions first. See How to enable Auto Sync for old S3 buckets connected in CloudFiles for steps.