Project website: https://fedorahosted.org/s3fs
There are a few different projects calling themselves “s3fs”, but I have used this one with a lot of success. It is written in python and uses fuse, making it very easy to use on the desktop.
Prerequisites
- Amazon Web Services Account – http://aws.amazon.com
sudo aptitude install python-fuse python-boto git-coregit clone git://git.fedorahosted.org/s3fs s3fs
Handy things
One thing that isn’t required, but is very handy, is s3cmd:
sudo aptitude install s3cmd
If you opted to install s3cmd, run s3cmd --configure and enter your amazon account details. From there you can run commands like s3cmd ls and s3cmd la to see items stored on your account and verify s3fs is working as expected.
Using s3fs
The first thing we need to do is put our access key and our secret key into the environment variables. This could be dangerous if your box is compromised as people could take your keys, but there isn’t much that isn’t dangerous if it’s compromised anyway. Ideally you can make a small bash script with your keys in it for when you launch s3fs and just chmod that 600 for your user, or make it prompt you using the bash ‘read’ command.
For playing around, just throw it in your environment (it will show up in your history, but if you enter a space before these commands it wont):
export AWS_ACCESS_KEY_ID="YOUR_KEY_ID_HERE"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_KEY_HERE"
Run s3fs
To run s3fs just change to the directory, and chmod +x if it isn’t already executable:
cd s3fs/src
chmod +x s3fs
./s3fs --help
Create a bucket for your files
We need to create a “bucket” which is like a folder to store our files in:
s3fs -C -c ubuntushareddrive
I made up ubuntushareddrive, your bucket name needs to be a globally unique name for all of amazon web services, so you might want to add some numbers at the end of it etc.
After that, we need to “format” our s3fs bucket:
s3fs -C -f ubuntushareddrive
From there, we can mount it and are good to go:
mkdir ~/amazon_drive
s3fs -o bucket=ubuntushareddrive ~/amazon_drive/
For questions on this process, please leave comments on the blog first. If you find a bug, there is a trac page at https://fedorahosted.org/s3fs
Related posts:
#1 by Jad on May 8, 2008 - 4:53 am
Quote
Awesome, I wish I had better bandwidth to use S3 flawlessly
#2 by Neil Horman on October 27, 2008 - 9:44 am
Quote
The latest s3fs allows for a persistent caching option accross mounts. That will help in low bandwidth situations. Thanks!
Pingback: What I am reading for Oct 27, 2008 | Steven Harms' Blog