How To Use AWS SFTP Server with AWS S3

Reading Time: 4 minutes

Hello Readers ! I hope you are doing well . Today I am here with the new topic . In this blog we’ll see How To Use AWS SFTP Server with AWS S3. Firstly we’ll see the basic of AWS SFTP and then we’ll follow certain steps to use that .

So Let’s Get Start !!!



“Secure Shell (SSH) File Transfer Protocol (SFTP) is a network protocol use for the secure transfer of data over the internet. The protocol supports the full security and authentication functionality of SSH. It is widely used to exchange data, including sensitive information between business partners in a variety of industries such as financial services, healthcare, retail, and advertising.


Amazon Simple Storage Service (Amazon S3) is an item garage carrier that gives industry-main scalability, facts availability, security, and performance. It also presents control functions so you can optimise, organise, and configure get admission to in your facts to fulfil your unique business, organisational, and compliance requirements.

Configuring AWS SFTP Server with AWS S3

Now we’re going to configure an AWS SFTP server using AWS S3 and AWS Transfer Family. Follow the below steps one-by-one to do so .

Let’s Start Together !

STEP-1 First login into your console and search for service AWS Transfer Family .

STEP-2 On the AWS Transfer Family console, select “Create Server”.

STEP-3 Choose SFTP

STEP-4 As an identity provider, choose “Service Managed.” For your different purposes, you can use AWS Directory Service or Custom Identity provider options.

STEP-5 SFTP server should not be publicly accessible but we need to access it from port 22. To do this, we need to set a VPC, public subnet, and Elastic IP address. Also, you can use your own hostname for the SFTP endpoint.

STEP-6 You need to define a security group. Source IP should be your VPN IP.

STEP-7 For the domain, we’re selecting AWS S3.

STEP-8 Configure additional details. (Do not need to change anything for now.)

STEP-9 Your AWS SFTP server is up and running! Now, we need to create an SFTP user for access.

STEP-10 Now You need to ADD USER and then select a username, create an IAM role for your S3 access and select an AWS S3 bucket.

  • Your IAM role trust policy should look like this:

STEP-11 We need to create an SSH key using ssh-keygen. Use this command to create a key:

$ ssh-keygen -P “” -m PEM -f key_name

STEP-12 Open file and copy the text and paste it into SSH public key , under ADD USER Configuration .

STEP-13 Connect your SFTP server with this command:

$ sftp -i <your_private_key> <username>@<sftp_dns_host>

STEP-14 Try to list your AWS S3 Bucket with ls.

STEP-15  Now we should Upload a file:

Yes , we have successfully Use AWS SFTP Server with AWS S3.


So we have seen How we can use AWS SFTP Server with AWS S3 . I hope you have learned new topic . In case you have any queries you can ask me .

happy Learning !!!

Thank You


Click Here

Written by 

Deeksha Tripathi is a Software Consultant at Knoldus Inc Software. She has a keen interest toward learning new technologies. Her practice area is DevOps. When not working, she will be busy in listening music , and spending time with her family .