-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bucket Region #149
Comments
How does boto do it? is there a look up api or something? |
In python I use the following code (without region): from boto.s3.connection import S3Connection I am not finding where I read that when region is missing, it's called 'universal' region, but I'm looking for it now. |
Maybe boto is checking aws GetBucketLocation api, or it's looping through all regions to find where the bucket is. I don't really know. but I know it's working. I can't find a way in goamz to connect to bucket when the region is unknown. |
And thank you for your quick answer! |
I really don't know if there already is a way to to it with goamz or not, if you asked me before this, I would have said goamz does not care, you don't need to know the region, but I have not read that part of the code in ages, maybe people who actually done so should answer and I should shut my mouth :) |
I am using the following code:. conn := s3.New(auth, aws.USWest2) // Here is the part which region is needed The s3.New() inforce me to supply region. maybe I am doing it wrong. I've tried to look in the source to find another way to create s3 object without region but found nothing. thanks again. |
Why not provide it? you can get your region with |
Thank you. |
You mean on actual EC2 instances it returns "unknown" ?! really? what region are you trying it on? |
Thank you for your response. My region is USWest2.
If I curl http://169.254.169.254/latest/meta-data/placement/availability-zone it returns |
if you
|
Sorry, I didn't explained well. I am not working on EC2 instance. I develop a software on a local machine - a program that fetchs data from S3 bucket for several key/secret combinations. Currently it's working alright with the above code, but as you noticed - I've explicitly set the region in the s3.New() function to aws.USWest2. |
got you, that is why you get unknown region, I don't know of any solution, but I am sure there is one, |
How can I connect to S3 bucket without knowing it's Region?
Is this API call implemented in this library? http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
or better, In boto (python) aws sdk I can connect to S3 bucket with 'universal' region without the need to find what the bucket region is.
The text was updated successfully, but these errors were encountered: