S3fs is a fuse based file system backed by Amazon S3. This permit mount a S3 bucked as a file system ans store files and folders transparently.

I have installed s3fs in a t1.micro ec2 instance with ubuntu 12.04.1 TLS x64. To install s3fs I have followed the next steps.

1. Create a bucket named mybucked.

2. Create IAM user and add permissions.

3. Install s3fs


cd /tmp/
apt-get install build-essential libfuse-dev fuse-utils libcurl4-openssl-dev libxml2-dev mime-support

wget https://s3fs.googlecode.com/files/s3fs-1.66.tar.gz
tar xvzf s3fs-1.65.tar.gz
cd s3fs-1.65/
make install

4. Configure credentials

Create a file /etc/passwd-s3fs add the credentials like the next line:

<Access key id>:<secret access key>

Change perms of /etc/passwd-s3fs

chmod 600 /etc/passwd-s3fs

5. Create a mount point

mkdir /mnt/s3
chmod 777 /mnt/s3

without 777 permissions only root can write to bucket.

6. Mount manually

s3fs mybucket /mnt/s3 -o noatime -o allow_other -o uid=1000 -o gid=1000 -o use_cache=/tmp -o default_acl=public-read-write

7. Configure to mount in boot time.

The documentation says that to mount s3 bucket in boot time, you need add to /etc/fstab the next line:

s3fs#enterwinetest /mnt/s3 fuse defaults,noatime,allow_other,uid=1000,gid=1000,use_cache=/tmp,default_acl=public-read-write 0 0

but, in my case. When I reboot the instance, it not start.

To automount I have added the next line to /etc/rc.local

/usr/local/bin/s3fs enterwine /mnt/s3 -o noatime -o allow_other -o uid=1000 -o gid=1000 -o use_cache=/tmp -o default_acl=public-read-write