Mount S3 bucket to EC2 instance

Dec 10, 2020    Janaki Mahapatra, AWS

Many systems provide pre-built packages:

Amazon Linux via EPEL:

sudo amazon-linux-extras install epel
sudo yum install s3fs-fuse

Enter your credentials in a file ${HOME}/.passwd-s3fs and set owner-only permissions:

chmod 600 ${HOME}/.passwd-s3fs

Run s3fs with an existing bucket mybucket and directory /path/to/mountpoint:

s3fs mybucket /path/to/mountpoint -o passwd_file=${HOME}/.passwd-s3fs

Now check you mount point by

df -h

Mount S3 bucket to EC2 instance

Thats all for today. See you in a new post.