Skip to main content

AWS S3 SFTP Destination

The S3 SFTP destination delivers audience files to Amazon S3 via SFTP protocol. This is distinct from the direct AWS S3 destination — instead of using AWS IAM credentials to write directly to S3, this destination connects via an SFTP server that fronts an S3 bucket. This pattern is common with managed SFTP services (such as AWS Transfer Family) that expose S3 storage over standard SFTP.

Prerequisites

Before setting up the S3 SFTP destination, make sure the following are in place:

  • An SFTP endpoint that delivers files to your S3 bucket (e.g., AWS Transfer Family, a third-party SFTP-to-S3 gateway)
  • Valid SFTP credentials for the endpoint (username and password, or a private key)
  • The hostname and port of the SFTP server
  • A MessageGears audience or Blueprint ready to publish — see Creating and Editing Audiences and Blueprints for Campaign Segmentation

Step 1: Provide your SFTP credentials to MessageGears

Provide the following connection details to MessageGears Support when setting up the destination:

FieldDescription
SFTP HostnameThe hostname or IP address of your SFTP server
SFTP PortThe port your SFTP server listens on (default: 22)
UsernameSFTP username
PasswordSFTP password (if using password authentication)
Private KeyRSA private key (if using key-based authentication)

MessageGears Support will configure the destination and confirm when it is ready to use.

info

If you are using a private key for authentication, the key must be in RSA format. OpenSSH keys can be converted with:

ssh-keygen -p -N "" -m pem -f your_private_key

Step 2: File format

The S3 SFTP destination delivers files in CSV format. Files are named based on the campaign name and delivered to the path configured on the SFTP server.

Step 3: Build your audience in MessageGears

Use the MessageGears audience builder or a Blueprint to define the segment you want to deliver.

For guidance on building audiences and Blueprints, see:

Step 4: Create an External Campaign targeting the S3 SFTP destination

Once your audience is defined and the S3 SFTP destination is configured, create an External Campaign:

  1. Navigate to Campaigns > External.
  2. Under Settings, select your audience or Blueprint.
  3. In the Destination dropdown, select your S3 SFTP destination.
  4. Set your schedule (one-time or recurring) and click Save or Launch.

For a full walkthrough of the External Campaign workflow, see External Campaigns.

Troubleshooting

SymptomLikely causeResolution
Campaign fails to deliverInvalid SFTP credentials or unreachable hostVerify hostname, port, and credentials; contact MessageGears Support
Private key authentication failsKey not in RSA formatConvert your key using the ssh-keygen command above
Files missing from S3SFTP server not routing to expected bucket pathVerify your SFTP server configuration routes to the correct S3 bucket

For additional help, contact MessageGears Support.