Skip to content

optional 'host' parameter to use any S3-compatible host #1

Closed
wants to merge 1 commit into from

10 participants

@berler
berler commented Sep 9, 2011

Allows Net::Amazon::S3 to be used with any S3-compatible host by setting the host parameter when creating the Net::Amazon::S3 object. This allows you to override the default of 's3.amazonaws.com'.

Example:

my $s3 = Net::Amazon::S3->new({
    aws_access_key_id     => $aws_access_key_id,
    aws_secret_access_key => $aws_secret_access_key,
    retry                 => 1,
    host                  => 'my.s3.compatible.host.com',
});

The host parameter already exists in the Amazon::S3 module, so this feature is needed to make Net::Amazon::S3 and Amazon::S3 interchangeable.

@berler berler optional 'host' parameter to use any S3-compatible host
Allows Net::Amazon::S3 to be used with any S3-compatible host by
setting the 'host' parameter when creating the Net::Amazon::S3
object. This allows you to override the default of 's3.amazonaws.com'.

Example:
my $s3 = Net::Amazon::S3->new({
	aws_access_key_id     => $aws_access_key_id,
	aws_secret_access_key => $aws_secret_access_key,
	retry                 => 1,
	host                  => 'my.s3.compatible.host.com',
});
970d7fa
@pfig
Owner
pfig commented Nov 17, 2011

Hi,

My problem with this is that I can't test it, as I don't have access to any system running Walrus or similar. If you could provide me with access to such a system, I'd be happy to test and incorporate the changes.

Cheers,

Pedro

@berler
berler commented Dec 12, 2011

Hi Pedro,

Just in case you missed it, I responded in a direct message to you. Let me know if you need anything else.

-Steven Berler

@jvanvleet

I believe this is a key feature that needs to be added. Notice there are a lot of branches for this simple thing.

Also, you can test this using any of the amazon s3 region specific listed in http://docs.amazonwebservices.com/general/latest/gr/rande.html (which is coincidentally how we want to use the host param and not for non-s3 gateways)

@abh
abh commented Jan 21, 2013

If you are still waiting for access to a compatible service to include this, then DreamHost's S3 compatible service has a 2 month free trial (and usage-only billing similar to Amazon AWS): http://dreamhost.com/cloud/dreamobjects/

@TJC
TJC commented May 3, 2013

I'm surprised this simple feature hasn't been implemented after a couple of years!
If it helps you, note that there are a number of free S3-compatible implementations you can install yourself.
For instance, RiakCS and Ceph.

@jimbobhickville

We could really use this as we're testing out S3 compatible services (ceph, swift) and most of our code is already in Perl. It's such a minor change, I think the lack of testing shouldn't be as big of a concern as long as the default still works. Is there anything I can do to help get this on CPAN? I'd be happy to run tests with this patched version against our ceph cluster and report back results or whatever else you have in mind.

@elliott-davis

I would like to +1 this. We also have a Ceph implementation that we would like to use this module with. I would be happy to test this pull request and verify that it does indeed work and no break default functionality.

@estrabd
estrabd commented Aug 27, 2013

I found this today coincidentally, we're interested in using it for Ceph as well. Amazon::S3 is not the robust module out there, but it has a host parameter. Our only alternative would be to write our own, which we don't want to do. Thank you.

@TJC
TJC commented Oct 10, 2013

It's been more than two years now! Still nothing? Why? It works fine with the patch provided above.
I'm tired of manually patching this module every time I install it.

@andreas-rieck

Hi,

what is the chance of getting the host-feature soon? Can offer a s3 compatible account for testing.

-andreas

@TJC
TJC commented Jan 20, 2014

We're maintaining a fork of N-A-S3 here: https://github.com/strategicdata/net-amazon-s3
The only difference is that it includes the host selection option.

@rustyconover
Collaborator

Closing. Released and supported in 0.80 on CPAN out of my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.