0

For the first time I am using amazon web s3. I want to create bucket with the following code:

import boto

s3 = boto.connect_s3('root', 'root')

bucket = s3.create_bucket('firstbucket')

But I get error of socket.timeout: timed out

Bertrand Martel
  • 42,756
  • 16
  • 135
  • 159
python_user
  • 196
  • 1
  • 5
  • 15
  • It seems that you have an error in your code. Have you created the connection based on [this manual?](http://boto.cloudhackers.com/en/latest/s3_tut.html) – Mani Dec 28 '16 at 11:09
  • What kind of error? i have referred this link https://aws.amazon.com/articles/3998 @Mani – python_user Dec 28 '16 at 11:35
  • can you pass the credentials in boto.connect_s3? – Mani Dec 28 '16 at 11:40
  • yes.. according to this link http://boto.cloudhackers.com/en/latest/s3_tut.html check under Creating a Connection. – python_user Dec 28 '16 at 11:42
  • Please note that they haven't supplied AWS credentials in `conn = boto.connect_s3()` which means that the credentials are already available in the form of configuration. try to create connection using `conn = S3Connection('', '')` – Mani Dec 28 '16 at 11:47
  • conn = boto.connect_s3() is an alternative way. I even tried conn = S3Connection('', '') but I am getting same error. – python_user Dec 28 '16 at 11:50
  • Try [referring this] (http://stackoverflow.com/questions/31092056/how-to-create-a-s3-bucket-using-boto3) answer. Also try to use Boto3 Since it has many advantages than boto2. – Mani Dec 28 '16 at 11:58
  • ok..i will check. thank you. – python_user Dec 28 '16 at 12:03

0 Answers0