AWS S3 is a popular choice for cloud storage, due to its cost and stability.
It will be super convenient if we can mount the S3 bucket, so that to access it through FTP or from local OS directly.
Steps:
- create the S3 bucket
- set up the proper access
- either through s3 policy
- or through IAM policy
- if through IAM policy, need to create the role, associate the role with the policy
- install s3fs either from source or package
#ubuntu
sudo apt install s3fs #from source
git clone https://github.com/s3fs-fuse/s3fs-fuse.git cd s3fs-fuse ./autogen.sh ./configure make sudo make install
- mount by role
mkdir /mnt-drive && s3fs -o iam_role=”role-from-step-2” -o allow_other S3-bucket /mnt-drive
- mount by key
-
mkdir /mnt-drive && s3fs
-o passwd_file=${HOME}/.passwd-s3fs
-o allow_other S3-bucket /mnt-drive
-
- FTP
-
install vsftpd
systemctl start vsftpd
-