Mount AWS S3 bucket to your Debian


Linux Amazon-S3


Table of contents:

This is really nice to have as it can extend Linux file system with unlimited capacity for assets / logs / recorded call etc. The key is S3FS!

Ok, let’s get started.

The following dependencies you will need:

1apt-get install build-essential git libfuse-dev libcurl4-openssl-dev libxml2-dev mime-support automake libtool pkg-config libssl-dev

Clone S3FS to your Linux FS:

1git clone https://github.com/s3fs-fuse/s3fs-fuse

Change your directory and build the software:

1cd s3fs-fuse/
2./autogen.sh && ./configure --prefix=/usr --with-openssl && make && make install

Once done, create access data to your bucket:

1touch ~/.passwd-s3fs

And now put your access and secret keys pair to this file in the following format: AWS Access Key ID:AWS Secret Access Key Now last thing is to mount:

1mkdir /tmp/cache
2chmod 777 /tmp/cache
3mkdir /mnt/yourbucketname
4s3fs -o use_cache=/tmp/cache yourbucketname /mnt/yourbucketname

Now you should be able to see uploaded files in your AWS Explorer or vice versa! Enjoy!

comments powered by Disqus