AWS Transfer for SFTP
User Guide

Using the AWS SFTP Service

You transfer files over the AWS SFTP service by specifying the operation in an SFTP client. AWS SFTP supports OpenSSH (Macintosh and Linux), WinSCP (Windows only), Cyberduck (Windows, Macintosh, and Linux) and FileZilla (Windows, Macintosh, and Linux).

Using OpenSSH

The instructions that follow show you how to transfer files from the command line using OpenSSH.

To transfer files over AWS SFTP using the OpenSSH command line utility

  1. On Linux or Macintosh, open a command terminal.

  2. At the prompt enter the following command: % sftp -i transfer-key sftp_user@service_endpoint,

    where sftp_user is the user name, transfer-key is the SSH private key, and service_endpoint is the SFTP server's endpoint as indicated in the AWS SFTP console for the selected SFTP server.

  3. When the sftp prompt appears, enter: sftp> pwd,

    and when the following line appears enter: /mybucket/home/sftp_user, which is the target of the file transfer.

  4. When the sftp prompt next appears issue the following command: sftp> put filename.txt,

    where the put command transfers the file into the Amazon S3 bucket.

    A message appears indicating that the file transfer is in progress, or complete.

    Uploading filename.txt to /my-bucket/home/sftp_user/filename.txt

    some-file.txt 100% 127 0.1KB/s 00:00

Note

It can take a few minutes after server creation for the server endpoint hostname to be resolvable by the DNS service in your environment. For testing purposes, use a regional endpoint and log in as user_name.serverid@service_endpoint.

Using WinSCP

The instructions that follow show you how to transfer files using WinSCP.

To transfer files over AWS SFTP using WinSCP

  1. Open the WinSCP client and choose New Session.

  2. Choose SFTP for File protocol, if necessary.

  3. In the Login dialog box shown following, choose New Site from the navigation pane.

  4. Enter the server endpoint into the Host name text box.

  5. Enter the user name into the Username text box.

  6. Choose the Advanced to open the Advanced dialog box shown following, and then in the navigation pane choose Authentication in the SSH section.

  7. Browse for and choose the SSH private key file from your file system.

  8. If WinSCP offers to convert your SSH private key to the PPK format as shown following, choose OK.

  9. Choose OK to return to the Login dialog box, then choose Save.

  10. In the Save session as site dialog box shown following, choose OK to complete your connection setup.

  11. Perform your SFTP file operation

Using CyberDuck

The instructions that follow show you how to transfer files using CyberDuck.

To transfer files over AWS SFTP using Cyberduck

  1. Launch Cyberduck and open the Connection dialog box.

  2. For Protocol, choose SFTP (SSH File Transfer Protocol).

  3. On the AWS SFTP Servers page, choose the SFTP server that you want to use for file operations by enabling the check box next to its name.

  4. Copy the service endpoint and paste that endpoint into the Server box, as shown following for Cyberduck's Open Connection dialog box.

    The Open Connection dialog box for Cyberduck

  5. Enter the user name in the form username.

  6. For SSH Private Key, choose the SSH private key.

  7. (Optional) For Path choose More Options; then enter a target or source Amazon S3 directory.

  8. Choose Connect.

    The Amazon S3 directory opens in one of the panes of the SFTP client.

  9. Choose the files that you want to transfer, and drag and drop them from your local directory into the Amazon S3 directory (the target).

    Alternatively, select the files in the Amazon S3 directory (the source) and drag and drop them into your local directory.

    The files are then transferred.

Using FileZilla

The instructions that follow show you how to transfer files using FileZilla.

To set up FileZilla for an SFTP file transfer

  1. Choose Connect to open the Connection dialog box.

  2. Select SFTP as the protocol, with Port 22.

  3. Enter the hostname.service_endpoint for the SFTP server.

    In the example shown previously, the server endpoint is s-19946eb6c6434ef38.server.transfer.us-west-2.amazonaws.com.

  4. Enter the user name in the form username.ServerId.

    In the example shown previously, this user name takes the form username.s-19946eb6c6434ef38.

  5. Choose Browse and upload the SSH private key into this FileZilla connection.

  6. Choose Connect.