Explain process of mounting s3 to ec2 instance?


Posted On: Feb 22, 2018


Follow below steps to mount s3 to ec2 instance

1. Update the system

apt-get update

2. Install the dependencies

sudo apt-get install automake autotools-dev fuse g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config

3. Clone s3fs source code from git

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

4. Run below commands to change source code directory, compile and install the code.

cd s3fs-fuse
./configure --prefix=/usr --with-openssl
sudo make install

5. Run s3fs command to check where command is placed

which s3fs

6. Get your access key and secret key ready.

7. Create a new file in /etc with the name passwd-s3fs and paste your access key and secret key.

touch /etc/passwd-s3fs
vim /etc/passwd-s3fs

8. Change the permission of the file

sudo chmod 640 /etc/passwd-s3fs

9. Now create a directory or provide the path of an existing directory and mount S3bucket in it.

mkdir /mys3bucket
s3fs your_bucketname -o use_cache=/tmp -o allow_other -o uid=1001 -o mp_umask=002 -o multireq_max=5 /mys3bucket

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    AWS S3 interview questions

    Explain AWS S3 bucket?

    Amazon S3 (Simple Storage Service) is a simple web service interface that allows huge amount of data storage and retrival from anywhere from the internet.Its provides developers highly scalable, relia...

    AWS S3 interview questions

    What is the maximum size of S3 bucket?

    In S3 bucket you can store unlimited volume of data and number of objects. A single Amazon S3 objects can be a size of range 0 bytes to 5 terabytes. In single upload request You can put an object of a...

    AWS S3 interview questions

    How to list objects of a S3 bucket?

    use aws s3 ls --recursive command on aws CLI to list all files or objects under the specified directory or prefix...