Note that WinSCP supports a direct access to S3 storage.
If you need to access/manage files stored on Amazon S3 (Simple Storage Service) bucket via SFTP, you can mount the bucket to a file system on a Linux server and access the files using the SFTP as any other files on the server.
This guide shows how to mount the S3 bucket using
s3fs file system to an Amazon EC2 server and access it using WinSCP.
- Creating Access Server
- Installing s3fs
- Mounting S3 Bucket to File System
- Connecting to the Access Server to Manage the Bucket
- Further reading
If you do not have a Linux server available for the mounting, launch a new Amazon EC2 server.
A basic Amazon Linux AMI (free tier eligible) server will generally suffice and the following instructions are tested on this distribution. Instructions for other distributions may differ.
To install the
s3fs file system:1
- Login to your Linux server via SSH.
- Install dependencies:
sudo yum install automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel
- Compile and install
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
sudo make install
- Switch to
- Store security credentials that will be used to access the S3 bucket to
echo <access-key-id>:<secret-access-key> > /etc/passwd-s3fs
chmod 600 /etc/passwd-s3fs
<secret-access-key>with the actual values)
- Create mount point (example):
- Add entry to
fstabto mount the bucket:
echo s3fs#<bucket> /mnt/<bucket> fuse _netdev,rw,nosuid,nodev,allow_other,nonempty 0 0 >> /etc/fstab
(Replace the leading
<bucket>with your bucket name and the
/mnt/<bucket>with the mount point)
- Mount the bucket: