Skip to content

Instantly share code, notes, and snippets.

@ogt
Created April 2, 2013 17:29
Show Gist options
  • Save ogt/5294262 to your computer and use it in GitHub Desktop.
Save ogt/5294262 to your computer and use it in GitHub Desktop.
HOWTO - Mount an S3 bucket to a local file folder

We use Fuse FS and s3fs.

For instructions about how to create a bucket with its own access keys - so as you don't spread your own access keys everywhere) check this gist: https://gist.github.com/ogt/5294121

># install fuse from http://osxfuse.github.com/
 
> brew install s3fs
> brew info fuse4x-kext
…
> sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions
> sudo chmod +s /Library/Extensions/fuse4x.kext/Support/load_fuse4x
> mount -t fuse4x
> sudo kextunload -b org.fuse4x.kext.fuse4x  # may cause errors if no prior uses
> echo 'mybucket:accessKeyId:secretAccessKey' >> ~/.passwd-s3fs  #replace the accessKey and secretAccessKey with the real ones
> chmod 0600 ~/.passwd-s3fs
> # mybucket is the unique bucket name
> mkdir ~/S3
> s3fs mybucket ~/S3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment