Guangning Yu's Blog
Home
Code
Data
Setup
Industry
MachineLearning
Archive
Mount S3 bucket on EC2 Linux Instance
2019-09-16 10:51:31
|
AWS
1. Install dependencies ``` sudo apt-get update sudo apt-get install automake autotools-dev fuse g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config ``` 2. Install s3fs ``` git clone https://github.com/s3fs-fuse/s3fs-fuse.git cd s3fs-fuse ./autogen.sh ./configure --prefix=/usr --with-openssl make sudo make install which s3fs ``` 3. Config credentials ``` echo "Your_accesskey:Your_secretkey" >> /etc/passwd-s3fs sudo chmod 640 /etc/passwd-s3fs ``` 4. Create mounting point ``` mkdir /mys3bucket s3fs your_bucketname -o use_cache=/tmp -o allow_other -o uid=1001 -o mp_umask=002 -o multireq_max=5 /mys3bucket ``` 5. Config mount after reboot Add the following command in `/etc/rc.local`: ``` /usr/local/bin/s3fs your_bucketname -o use_cache=/tmp -o allow_other -o uid=1001 -o mp_umask=002 -o multireq_max=5 /mys3bucket ``` Reference: [How to Mount S3 bucket on EC2 Linux Instance](https://cloudkul.com/blog/mounting-s3-bucket-linux-ec2-instance/)
Previous:
AWS Certified Solutions Architect Associate Notes
Next:
Setup Nextcloud on Ubuntu