Mount AWS S3 bucket to your Debian
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.
- Create bucket in S3 and IAM user with full S3 access;
- Install dependencies;
- Install S3FS;
- Save access and secret key;
- Mount bucket;
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:
2./autogen.sh && ./configure --prefix=/usr --with-openssl && make && make install
Once done, create access data to your bucket:
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:
2chmod 777 /tmp/cache
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!