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:
| Field | Description |
|---|---|
| SFTP Hostname | The hostname or IP address of your SFTP server |
| SFTP Port | The port your SFTP server listens on (default: 22) |
| Username | SFTP username |
| Password | SFTP password (if using password authentication) |
| Private Key | RSA private key (if using key-based authentication) |
MessageGears Support will configure the destination and confirm when it is ready to use.
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:
- Navigate to Campaigns > External.
- Under Settings, select your audience or Blueprint.
- In the Destination dropdown, select your S3 SFTP destination.
- 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
| Symptom | Likely cause | Resolution |
|---|---|---|
| Campaign fails to deliver | Invalid SFTP credentials or unreachable host | Verify hostname, port, and credentials; contact MessageGears Support |
| Private key authentication fails | Key not in RSA format | Convert your key using the ssh-keygen command above |
| Files missing from S3 | SFTP server not routing to expected bucket path | Verify your SFTP server configuration routes to the correct S3 bucket |
For additional help, contact MessageGears Support.