Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: How to specify a Region when creating an AWS S3 bucket?

by Anonymous Monk
on Jan 09, 2017 at 13:06 UTC ( [id://1179213]=note: print w/replies, xml ) Need Help??


in reply to Re: How to specify a Region when creating an AWS S3 bucket?
in thread How to specify a Region when creating an AWS S3 bucket?

Hi, yes ... but the location_constraint parameter only accepts the values 'US' or 'EU' ... correct? Therefore you'll end up either at the Irland location (EU) or at the US East - N. Virginia location (US). I can't specify other valid AWS locations like eu-central-1 (Frankfurt). See complete list of location constraints: http://docs.aws.amazon.com/general/latest/gr/rande.html Even if I create a bucket in the AWS console - and than using this bucket in my Perl script - I can't create objects in that bucket.
  • Comment on Re^2: How to specify a Region when creating an AWS S3 bucket?

Replies are listed 'Best First'.
Re^3: How to specify a Region when creating an AWS S3 bucket?
by choroba (Cardinal) on Jan 09, 2017 at 14:09 UTC
    Isn't it because of the Signature V4? This GitHub PR might fix it.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re^3: How to specify a Region when creating an AWS S3 bucket?
by 1nickt (Canon) on Jan 09, 2017 at 14:05 UTC

    Before using location_constraint you must pass the host parameter to the Net::Amazon::S3 constructor. (Note I have never found it necessary to use the param after connecting in this way).

    Here's how I do it:

    $conf = { aws_access_key_id => 'foo', aws_secret_access_key => 'bar', host => 's3-us-west-1.amazonaws.com', }; my $s3_base = Net::Amazon::S3->new( $conf ); my $s3 = Net::Amazon::S3::Client->new( s3 => $s3_base ); my $bucket = $s3->bucket( name => $bucket_name ); ...

    Hope this helps!


    The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1179213]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-24 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found