I want to shares files with a client over the internet and am looking into ftp solutions on aws. I have tried aws sftp, but setting role policies is awkward and the service seems a bit costly for my basic use case. Is there an alternate way to setup an ftp server on EC2 or S3 that non-aws users can access. I want to add read permissions for different users for different subdirectories. I am using macosx.
I tried following instructions on https://stackoverflow.com/questions/7052875/setting-up-ftp-on-amazon-cloud-server but it is not clear how I can permission non-aws users to see my files and I couldn't get vsftpd working.
Is there a recommended/standard aws setup for sharing files with non aws users, preferably securely (sftp). I would be sharing updated files a few times a day every day with hundreds of users.
Best Answer
If you don't want to use AWS Transfer for SFTP, it is possible to set up your SFTP server directly from an EC2 instance.
If you follow correctly these instructions you should be able to create your SFTP users quite easily. In my specific case I used a micro T2 instance with Ubuntu 18.04
openSSH
/etc/ssh/sshd_config
using vim or nanoComment out
#Subsystem sftp /usr/lib/openssh/sftp-server
Then instead, add
Subsystem sftp internal-sftp
to allow SFTP connections into your serverLastly, at the end of the file specify the new group configurations
/etc/ssh/sshd_config
should look like:Follow the different instructions of the command below and input the user password.
/home/<user>
directory.You can create new folders that belongs to the user using
I created this repo few days ago that automate this process