SFTP Server for Amazon S3 · Docs

Getting started

From launch to a partner's first upload in about fifteen minutes.

1. Launch

Subscribe on AWS Marketplace and launch the CloudFormation template. You'll choose:

  • VPC and public subnets: pick two or more subnets in different Availability Zones, so a replacement can start in another zone if one fails.
  • Who can connect: an IP range for SFTP, or 0.0.0.0/0 for anyone (logins still need a password or key).
  • Bucket: leave it empty to create a new private, encrypted bucket, or name one you have.
  • Optional: an IP range for the web admin, an email address for upload notifications, and logging to CloudWatch (on by default).

When the stack shows CREATE_COMPLETE, the server is listening. Its address is the SftpAddress output.

2. Add a partner

Open the AdminConsole output link (a shell in your browser, with no open ports), choose the instance named after your stack, and run:

sudo sftp-admin user add acme -password
sudo sftp-admin host-key

Send the partner the address, their username and password, and the host key fingerprint so they can check they've reached the right server the first time they connect.

Folders and access levels are optional:

# an upload-only drop box in a shared folder
sudo sftp-admin user add acme-drop -password -home partners/acme -access upload-only

3. Use the web admin (optional)

If you set a web admin IP range, create an admin account and open the AdminWebsite output:

sudo sftp-admin admin add YOUR-NAME

Your browser warns about the certificate the first time, because the server has no domain name. At first sign-in you set up two-step sign-in with an authenticator app.

4. Everyday commands

sudo sftp-admin status                  # summary: running?, address, users, settings
sudo sftp-admin user list
sudo sftp-admin user passwd acme
sudo sftp-admin user remove acme        # their files are kept
sudo journalctl -u sftp-server -f       # follow the log

Signing in over SSH shows the same summary automatically.

Upgrading

When a new version is out, the web admin shows a notice, and its Upgrade page has the steps: update your CloudFormation stack with the new template and image. Users, files, the address and the host key all carry over, and partners see only a few seconds' gap. If anything goes wrong, CloudFormation puts the current server back.

If something fails

If the server or its Availability Zone fails, AWS starts a replacement automatically, usually within one to two minutes. It takes over the same address and restores the host key and users, so partners just reconnect. Uploads in progress at that moment need to be sent again; finished files are already safe in S3.

Need help?

Email support@delreysoftware.com.