Discussion:
Cannot create a bucket following simple web example. Why?
Saqib Ali
2012-11-11 15:18:16 UTC
Permalink
I'm trying to learn how to use AWS and I'm interested in using the Python
interface (Boto)

I downloaded and installed Boto on my local Unix machine. I put my AWS
personal and private keys in my configuration file ~/.boto. Now I'm trying
to write my first "hello world" boto app as described here:
http://aws.amazon.com/articles/3998?_encoding=UTF8&jiveRedirect=1

But it's not working. I'm using my aws_access_key_id as the name of my
bucket:

s3.create_bucket('AKIAI47G2JOAP4SEEWAA'.lower())


but it fails. The error is: *socket.gaierror: [Errno 8] node name or
service name not known*


I logged into the AWS community forum (
https://forums.aws.amazon.com/category.jspa?categoryID=3) to ask this
question. But I don't see any button to "Post your new Question". What am I
getting wrong? How can I be so dumb as to not even know how to post a
question???

Also, what am I doing wrong here that is causing this error?
--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/boto-users/-/iHkHbprtLHYJ.
To post to this group, send email to boto-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to boto-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.
Mitchell Garnaat
2012-11-11 21:04:22 UTC
Permalink
Hi -

The error you are getting suggests that you may be having a problem with
your internet service or your DNS service. You are not even getting to the
S3 service. Are you able to access other sites on the internet?

Mitch
Post by Saqib Ali
I'm trying to learn how to use AWS and I'm interested in using the Python
interface (Boto)
I downloaded and installed Boto on my local Unix machine. I put my AWS
personal and private keys in my configuration file ~/.boto. Now I'm trying
http://aws.amazon.com/**articles/3998?_encoding=UTF8&**jiveRedirect=1<http://aws.amazon.com/articles/3998?_encoding=UTF8&jiveRedirect=1>
But it's not working. I'm using my aws_access_key_id as the name of my
s3.create_bucket('**AKIAI47G2JOAP4SEEWAA'.lower())**
but it fails. The error is: *socket.gaierror: [Errno 8] node name or
service name not known*
I logged into the AWS community forum (https://forums.aws.amazon.**
com/category.jspa?categoryID=3<https://forums.aws.amazon.com/category.jspa?categoryID=3>
**) to ask this question. But I don't see any button to "Post your new
Question". What am I getting wrong? How can I be so dumb as to not even
know how to post a question???
Also, what am I doing wrong here that is causing this error?
--
You received this message because you are subscribed to the Google Groups
"boto-users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/boto-users/-/iHkHbprtLHYJ.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/boto-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To post to this group, send email to boto-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to boto-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.
Saqib Ali
2012-11-15 14:57:17 UTC
Permalink
Thanks. You are right about that.
My machine wasn't able to ping AWS by domain name, only raw IP address. So
I fixed that. The error shown above has gone away. But I sill have a
problem creating a bucket. Below is my sample code.

Of course I first modified the ~/.boto file to contain my AWS_ACCESS_KEY
and my AWS_SECRET_KEY

The code shown below just sits there after printing letters A through F. It
never gets past that point. So clearly there is a problem with my
create_bucket function. Can any help diagnose why this is a problem?


#!/usr/bin/env python
import sys
import boto

print "A"

AWS_ACCESS_KEY_ID = '<Access Key Removed>'

print "B"

bucket_name = AWS_ACCESS_KEY_ID.lower() + '-mah-bucket'
print "D"
conn = boto.connect_s3()

print "E"


import boto.s3
print "F"
bucket = conn.create_bucket(bucket_name,
location=boto.s3.connection.Location.DEFAULT)

print "G"
testfile = "me.txt"
print "H"
print 'Uploading %s to Amazon S3 bucket %s' % (testfile, bucket_name)

print "I"
def percent_cb(complete, total):
sys.stdout.write('.')
sys.stdout.flush()

print "J"
from boto.s3.key import Key
print "K"
k = Key(bucket)
print "L"
k.key = 'my test file'
print "M"
k.set_contents_from_filename(testfile,
cb=percent_cb, num_cb=10)
print "N"
Post by Mitchell Garnaat
Hi -
The error you are getting suggests that you may be having a problem with
your internet service or your DNS service. You are not even getting to the
S3 service. Are you able to access other sites on the internet?
Mitch
Post by Saqib Ali
I'm trying to learn how to use AWS and I'm interested in using the Python
interface (Boto)
I downloaded and installed Boto on my local Unix machine. I put my AWS
personal and private keys in my configuration file ~/.boto. Now I'm trying
http://aws.amazon.com/**articles/3998?_encoding=UTF8&**jiveRedirect=1<http://aws.amazon.com/articles/3998?_encoding=UTF8&jiveRedirect=1>
But it's not working. I'm using my aws_access_key_id as the name of my
s3.create_bucket('**AKIAI47G2JOAP4SEEWAA'.lower())**
but it fails. The error is: *socket.gaierror: [Errno 8] node name or
service name not known*
I logged into the AWS community forum (https://forums.aws.amazon.**
com/category.jspa?categoryID=3<https://forums.aws.amazon.com/category.jspa?categoryID=3>
**) to ask this question. But I don't see any button to "Post your new
Question". What am I getting wrong? How can I be so dumb as to not even
know how to post a question???
Also, what am I doing wrong here that is causing this error?
--
You received this message because you are subscribed to the Google Groups
"boto-users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/boto-users/-/iHkHbprtLHYJ.
.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/boto-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/boto-users/-/gxDNzXbF9cEJ.
To post to this group, send email to boto-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to boto-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.
lovesh harchandani
2013-02-08 07:53:55 UTC
Permalink
When it prints the letter F just wait for 5 minutes. You should get some
error. Post the error that you are getting
Post by Saqib Ali
Thanks. You are right about that.
My machine wasn't able to ping AWS by domain name, only raw IP address. So
I fixed that. The error shown above has gone away. But I sill have a
problem creating a bucket. Below is my sample code.
Of course I first modified the ~/.boto file to contain my AWS_ACCESS_KEY
and my AWS_SECRET_KEY
The code shown below just sits there after printing letters A through F.
It never gets past that point. So clearly there is a problem with my
create_bucket function. Can any help diagnose why this is a problem?
#!/usr/bin/env python
import sys
import boto
print "A"
AWS_ACCESS_KEY_ID = '<Access Key Removed>'
print "B"
bucket_name = AWS_ACCESS_KEY_ID.lower() + '-mah-bucket'
print "D"
conn = boto.connect_s3()
print "E"
import boto.s3
print "F"
bucket = conn.create_bucket(bucket_name,
location=boto.s3.connection.Location.DEFAULT)
print "G"
testfile = "me.txt"
print "H"
print 'Uploading %s to Amazon S3 bucket %s' % (testfile, bucket_name)
print "I"
sys.stdout.write('.')
sys.stdout.flush()
print "J"
from boto.s3.key import Key
print "K"
k = Key(bucket)
print "L"
k.key = 'my test file'
print "M"
k.set_contents_from_filename(testfile,
cb=percent_cb, num_cb=10)
print "N"
Post by Mitchell Garnaat
Hi -
The error you are getting suggests that you may be having a problem with
your internet service or your DNS service. You are not even getting to the
S3 service. Are you able to access other sites on the internet?
Mitch
Post by Saqib Ali
I'm trying to learn how to use AWS and I'm interested in using the
Python interface (Boto)
I downloaded and installed Boto on my local Unix machine. I put my AWS
personal and private keys in my configuration file ~/.boto. Now I'm trying
http://aws.amazon.com/**articles/3998?_encoding=UTF8&**jiveRedirect=1<http://aws.amazon.com/articles/3998?_encoding=UTF8&jiveRedirect=1>
But it's not working. I'm using my aws_access_key_id as the name of my
s3.create_bucket('**AKIAI47G2JOAP4SEEWAA'.lower())**
but it fails. The error is: *socket.gaierror: [Errno 8] node name or
service name not known*
I logged into the AWS community forum (https://forums.aws.amazon.**
com/category.jspa?categoryID=3<https://forums.aws.amazon.com/category.jspa?categoryID=3>
**) to ask this question. But I don't see any button to "Post your new
Question". What am I getting wrong? How can I be so dumb as to not even
know how to post a question???
Also, what am I doing wrong here that is causing this error?
--
You received this message because you are subscribed to the Google
Groups "boto-users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/boto-users/-/iHkHbprtLHYJ.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/boto-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boto-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to boto-users-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/boto-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...