Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

s3 buckets creation - specifying regions

1,859 views
Skip to first unread message

marios

unread,
Nov 29, 2010, 5:13:32 AM11/29/10
to ruby-aws
Hi,

there seems to be some issue with creation of s3 buckets for regions
other than the default 'us-east' and 'eu'. At present you can either
not specify a location in which case a bucket is created in the us-
east datacenter, otherwise you can specify ':location => :eu' for
buckets in Ireland.

It should be possible to specify the location constraints: 'ap-
southeast-1' for the asia pacific region and 'us-west-1 ' for the us-
west region, as per
http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?RequestEndpoints.html
and http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?LocationSelection.html

I've been poking at the gem but can't see whats wrong. Note that this
was/is working fine with the right_aws gem (currently i am using
right_aws 2.0.0). If I specify :location => 'ap-southeast-1' then I
get "InvalidLocationConstraint: The specified location-constraint is
not valid". If I change the default endpoint to s3-ap-
southeast-1.amazonaws.com and also set the :location to 'ap-
southeast-1' then I get "IllegalLocationConstraintException: The AP-
SOUTHEAST-1 location constraint is incompatible for the region
specific endpoint".

I hope this makes some sense to someone :), many thanks for any help/
hints in advance,

marios

marios

unread,
Nov 29, 2010, 3:37:17 PM11/29/10
to ruby-aws
it seems that this was a simple case sensitivity issue - Michal Fojtik
has already issued a pull request for the fix -
https://github.com/appoxy/aws/pull/40


marios


On Nov 29, 12:13 pm, marios <marios.andr...@gmail.com> wrote:
> Hi,
>
> there seems to be some issue with creation of s3 buckets for regions
> other than the default 'us-east' and 'eu'. At present you can either
> not specify a location in which case a bucket is created in the us-
> east datacenter, otherwise you can specify ':location => :eu' for
> buckets in Ireland.
>
> It should be possible to specify the location constraints: 'ap-
> southeast-1' for the asia pacific region and 'us-west-1 ' for the us-
> west region, as perhttp://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?Requ...
> andhttp://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?Loca...

Travis Reeder

unread,
Nov 29, 2010, 7:24:11 PM11/29/10
to ruby...@googlegroups.com
Ok, I see the fix, but I think it could be much more DRY (see comments on that link). I'll pull it in after I see a cleaner fix.

--
You received this message because you are subscribed to the Google Groups "ruby-aws" group.
To post to this group, send email to ruby...@googlegroups.com.
To unsubscribe from this group, send email to ruby-aws+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ruby-aws?hl=en.


Reply all
Reply to author
Forward
0 new messages