Selective file transfer between SFTP server & Amazon S3 using AWS Transfer Family

Remote SFTP Server → AWS SFTP Connector → Amazon S3 bucket

This pattern shows how to use AWS Transfer Family to list and transfer specific files between an SFTP server and Amazon S3 bucket.

The remote SFTP server is simulated using AWS Transfer Family SFTP Server for this pattern. In a real use case, this can be any remote SFTP server outside of AWS.
SFTP Connector is configured to connect to the remote server with Amazon S3 bucket using SFTP protocol. The authentication is done using SSH Key based handshake.
Amazon S3 bucket is used for file storage on the AWS side.
User can list files on the remote server and selectively transfer files from the remote server to the Amazon S3 bucket using AWS Transfer Family API or CLI commands.
User can also transfer files from Amazon S3 to the remote server using the AWS Transfer Family API or CLI commands.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/awstransfer-s3-sam

Deploy

See the GitHub repo for detailed deployment instructions.bash deploy.sh


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the Amazon S3 input bucket content: aws s3 rm s3://{MySFTPServerS3Bucket} --recursive --region {my-region}
Delete the Amazon S3 output bucket content: aws s3 rm s3://{MyLocalS3Bucket} --recursive --region {my-region}
bash undeploy.sh

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn