Mount S3 bucket on your instance

At Exoscale, every employee is involved in support activities and you can learn about our motivations if you read this blog post.

This article shares a quick-step-guide given to a customer about mounting a bucket in his instance.

 

A customer of Exoscale asked how to mount a S3-bucket in his instance and access it like another folder. Even if it goes beyond the limit of the help we usually provide, I accepted to help as the case was interesting for me.

Here is a quick step-by-step guide for further reference. This was firstly tested on Debian 10 and validated with Ubuntu 20.04 LTS.

# upgrade your template
apt-get update -y && apt-get upgrade -y

# install s3fs
apt-get install s3fs -y

# create a password file in ${HOME}/.passwd-s3fs with the right permissions
echo INSERT-YOUR-API-KEY-HERE:API-SECRET-HERE > ${HOME}/.passwd-s3fs
chmod 600 ${HOME}/.passwd-s3fs

# mount your S3 bucket (located in Frankfurt) in /mnt/mybucket
mkdir /mnt/mybucket
s3fs BUCKET-NAME-HERE /mnt/mybucket -o url=https://sos-de-fra-1.exo.io

I got my bucket available in my OS and could create/delete files, as well as directories.

To get this work, I also checked a couple of internet pages, like:

* https://github.com/s3fs-fuse/s3fs-fuse
* https://fs-s3fs.readthedocs.io/en/latest/#

Haut de page