1

I literally just signed up for an S3 account, installed boto and would now like to try uploading a file. I'm using this as a reference - http://aws.amazon.com/articles/3998

I was surprised you needed to store your credentials as clear text in a file, but that's what I'm trying to do, though for a start I'm NOT putting in my password and expect to get an error.

So I did the following in python as instructed:

import boto

s3 = boto.connect_s3()

s3

S3Connection:s3.amazonaws.com

and the command succeeded, though I expected an error since my credentials are bad, but perhaps this is only a connection object and the real error should occur when I create the bucket. so then I tried this:

bucket = s3.create_bucket('1234567mjs7654321')

and command has been hanging for over 10 minutes.

I've got to believe there is something really basic I'm doing wrong but don't know what it might be.

here's the result of enabling debugging:

s3.create_bucket('1234567mjs7654321')
2013-01-11 17:58:17,765 foo [DEBUG]:path=/
2013-01-11 17:58:17,766 foo [DEBUG]:auth_path=/1234567mjs7654321/
2013-01-11 17:58:17,766 foo [DEBUG]:Method: PUT
2013-01-11 17:58:17,766 foo [DEBUG]:Path: /
2013-01-11 17:58:17,766 foo [DEBUG]:Data:
2013-01-11 17:58:17,766 foo [DEBUG]:Headers: {}
2013-01-11 17:58:17,766 foo [DEBUG]:Host: 1234567mjs7654321.s3.amazonaws.com
2013-01-11 17:58:17,766 foo [DEBUG]:establishing HTTPS connection:              host=1234567mjs7654321.s3.amazonaws.com, kwargs={}
2013-01-11 17:58:17,766 foo [DEBUG]:Token: None
2013-01-11 17:58:17,766 foo [DEBUG]:StringToSign:
PUT
Mark J Seger
  • 367
  • 2
  • 12

2 Answers2

0

I can't imagine why it would be hanging. I would recommend trying it with full debug logging to the console, like this:

import boto
boto.set_stream_logger('foo')
s3 = boto.connect_s3(debug=2)
s3.create_bucket('1234567mjs7654321')

You should see a lot of info dumped out to the console and perhaps that will contain a clue as to what is happening.

garnaat
  • 44,310
  • 7
  • 123
  • 103
  • I just tried it and it still hangs, with nothing particularly useful in the output. I'd be happy to post the output but adding comments doesn't allow one to enter anything other than a stream of chars, though I'm sure there must be some way – Mark J Seger Jan 11 '13 at 18:00
  • as you can see above I figured out how to insert my debug output, but it seems strange it needs to be done in the main question block OR is there some other way to do this? sorry, but I don't spend a lot of time in this forum, though given the knowledge of the users I think I will. – Mark J Seger Jan 11 '13 at 18:09
0

Solved!!! There WAS an access problem on my machine, though I'm not yet sure what but it did work from a different system. I'm just disappointed it didn't tell me that up front.

Mark J Seger
  • 367
  • 2
  • 12