This shows you the differences between two versions of the page.

Link to this comparison view

kb:aws_mount_s3_bucket_to_ec2_instance [2019/05/07 12:03] (current)
Line 1: Line 1:
 +====== AWS mount S3 bucket to EC2 instance ======
 +<code bash>
 +# 1.- Download the latest version of s3fs (which is a FUSE backend for S3) from http://code.google.com/p/s3fs/downloads/list
 +wget http://s3fs.googlecode.com/files/s3fs-r177-source.tar.gz
 +# 2.- Unpack it:
 +tar zxf s3fs-r177-source.tar.gz
 +# 3.- Install dependencies for building. In my Ubuntu AMI was:
 +apt-get install build-essential libxml2-dev libfuse-dev libcurl4-openssl-dev
 +# 4.- Build and install the code (this copies the binary s3fs to /usr/bin):
 +cd s3fs; make install
 +# 5.- Edit a config file for storing your keys (you can check them out under AWS Menu -> Your Account -> Security Credentials)
 +touch /etc/passwd-s3fs && chmod 640 /etc/passwd-s3fs && echo 'AccessKey:SecretKey' > /etc/passwd-s3fs
 +# If you dont want to leave any trace of your secret key in your shell history, use a text editor to edit the file rather than echoing it.
 +#6.- Create a directory for mounting the S3 filesystem and mount it. Note that you can mount the s3fs anywhere you like:
 +/usr/bin/s3fs bucketname /mnt/mountpoint
 +# 7.- Check it is woking correctly:
 +grep s3fs /etc/mtab
kb/aws_mount_s3_bucket_to_ec2_instance.txt ยท Last modified: 2019/05/07 12:03 by yehuda
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0