You are on page 1of 2

AKIARKSHVBJ6MOQ3WDVQ:0fnmAU1/+jKwXNzkJR0g+dhSVikYPHCa4IgPpFZJ

AKIARKSHVBJ6N3DNEJYD:gw+N3noBJK0FVlBx1WWnV0wpodfVNimCbEMSQAMS
1) create a s3 bucket(khetanbucket) and upload some test file.
2) create a IAM user with access type programmatic access.
3) this will generate one access key AKIARKSHVBJ6MOQ3WDVQ and a secret access key
save it like
accesskey:secret access key
AKIARKSHVBJ6N3DNEJYD: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

login to ec2 instance and follow this process.


1) yum update --( update OS)
2) yum install automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel
make openssl-devel -y (update required packages for s3)

3) git clone https://github.com/s3fs-fuse/s3fs-fuse.git (download s3 bucket


software)

[root@ip-172-31-8-243 ~]# cd s3fs-fuse/


[root@ip-172-31-8-243 s3fs-fuse]# ls
AUTHORS autogen.sh ChangeLog COMPILATION.md configure.ac COPYING doc INSTALL
Makefile.am README.md src test
[root@ip-172-31-8-243 s3fs-fuse]# ./autogen.sh
--- Make commit hash file -------
--- Finished commit hash file ---
--- Start autotools -------------
configure.ac:26: installing './config.guess'
configure.ac:26: installing './config.sub'
configure.ac:27: installing './install-sh'
configure.ac:27: installing './missing'
src/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
--- Finished autotools ----------
./configure --prefix=/usr --with-openssl

4) configure make
[root@ip-172-31-8-243 s3fs-fuse]# make
make all-recursive
make[1]: Entering directory `/root/s3fs-fuse'
Making all in src
make[2]: Entering directory `/root/s3fs-fuse/src'
Making all in test
make[2]: Entering directory `/root/s3fs-fuse/test'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/s3fs-fuse/test'
Making all in doc
make[2]: Entering directory `/root/s3fs-fuse/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/s3fs-fuse/doc'
make[2]: Entering directory `/root/s3fs-fuse'
make[2]: Leaving directory `/root/s3fs-fuse'
make[1]: Leaving directory `/root/s3fs-fuse'

5) make install
6) create file under /etc and paste the
[root@ip-172-31-8-243 s3fs-fuse]# vi /etc/passwd-s3fs
AKIARKSHVBJ6MOQ3WDVQ:0fnmAU1/+jKwXNzkJR0g+dhSVikYPHCa4IgPpFZJ
[root@ip-172-31-8-243 s3fs-fuse]# chmod 640 /etc/passwd-s3fs
s3fs khetanbucket -o use_cache=temp -o allow_other -o uid=1001 -o mp_umask=002 -o
multireq_max=5 /mys3bucket

s3fs khetan -o use_cache=temp -o allow_other -o uid=1001 -o mp_umask=002 -o


multireq_max=5 /mys3bucket

s3fs khetan /mybucket -o dbglevel=info -f -o curldbg

fusermount -u -z /mybucket
s3fs <MY BUCKET> /mnt -o url=https://s3-eu-central-1.amazonaws.com

s3fs khetan /mybucket -o url=https://s3-ap-south-1.amazonaws.com

Asia Pacific (Mumbai)


arn:aws:s3:::khetan

https://cloudkul.com/blog/mounting-s3-bucket-linux-ec2-instance/
df -k

You might also like