mounting-s3-bucket-locally-on-ubuntu

14y, 9d ago [edited]

Mounting s3 Bucket Locally on Ubuntu

Install, Configure, and Test s3cmd

Install:

sudo apt-get update
sudo apt-get install s3cmd

Configure:

s3cmd --configure

follow the prompts. You will need to prepare your Access Key ID and Access Key Secret.

list buckets:

s3cmd ls

list inside a bucket

s3cmd ls <bucket>

Install, Configure, and test s3fs-fuse

Install dependencies:

sudo apt-get install fuse-utils build-essential libcurl4-openssl-dev libxml2-dev libfuse-dev

Download sourcecode:

wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz
tar -xzvf s3fs-*  

Build sourcecode:

cd s3fs-*
./configure
sudo make
sudo make install

Configure s3fs password file:

sudo vim /root/.passwd-s3fs
sudo chmod 600 /root/.passwd-s3fs  

Format should be: <access key id>:<access key secret>

Test:

sudo s3fs <bucket name> <mount point>

Add to fstab to mount during boot:

s3fs#mybucket /mnt/s3 fuse allow_other,url=https://s3.amazonaws.com 0 0

Comments

hide preview ▲show preview ▼

What's next? verify your email address for reply notifications!

Leave first comment to start a conversation!