S3 – Mounting in Linux

In order to mount an S3 Bucket as a file system, you need to install s3fs

Create a directory to mount:

mkdir -p /mnt/s3

 

And add the following to "/etc/fstab":

artem-service-bucket:/upload/ /mnt/s3 fuse.s3fs _netdev,rw,nosuid,nodev,allow_other,nonempty,iam_role,umask=022,url=https://s3.eu-central-1.amazonaws.com,endpoint=eu-central-1 0 0

 

Where:

  • "artem-service-bucket:/upload/" – S3 bucket name and the directory inside the bucket to mount
  • "url=https://s3.eu-central-1.amazonaws.com,endpoint=eu-central-1" – the region where the S3 bucket is located
  • "iam_role" – indicate that we will use the IAM Role for authentication

 

Mount:

mount -a

 

 

Tagged: Tags

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments