How to Mount a S3 Bucket on Linux Instance?
Step 1: Update the system.
If you are using a new Centos or Ubuntu instance, then update the system using the below commands:
a. For CentOS or Red Hat.
b. For Ubuntu.
Step 2: Install the dependencies.
a. In CentOS or Red Hat.
b. In Ubuntu or Debian.
Step 3: Clone s3fs source code from git.
Step 4: Install the code.
Now change to source code directory, compile and install the code with the following commands:
Step 5: Check the s3fs command and installation.
Use the below command to check where the s3fs command is placed in OS. It will also tell you the installation is ok.
Step 6: Paste the access key and secret key.
Create a new file in /etc with the name passwd-s3fs and paste the access key and secret key in the below format.
Step 7: Change the permission of the file.
Step 8: Mount S3 bucket.
Now create a directory or provide the path of an existing directory and mount S3 bucket in it.
You can make an entry in /etc/rc.local to automatically remount after reboot. Find the s3fs binary file by the which command and make the entry before the exit 0 line as below:
Step 9: Check mounted s3 bucket.
or
Last updated