open-uri-s3

Usage:

require 'open-uri-s3'

Reading objects:

open('s3://my.bucket/public/hello') # returns AWS::S3::S3Object (quacks like IO)

or a safer option (see [this post] on the dangers of using open-uri with user input)

URI('s3://my.bucket/public/hello').read

Writing objects:

open('s3://my.bucket/public/hello', 'w'){|f| f.write 'Hello world!'}

Using a different (non-aws) backend

In order to use a different s3 compatible backend, you can use the following ENV variables

ENV['AWS_USE_SSL'] = 'false'
ENV['AWS_S3_ENDPOINT'] = 'http://my-s3-alternative'

Contributing to open-uri-s3

Copyright © 2013 Erik Terpstra. See LICENSE.txt for further details.

[open-uri-dangers]: sakurity.com/blog/2015/02/28/openuri.html