Not able to get instances after connecting to EC2

117 views
Skip to first unread message

ajay

unread,
Jul 22, 2013, 7:51:38 AM7/22/13
to boto-...@googlegroups.com
import boto
import boto.ec2
from boto.ec2.connection import EC2Connection

conn1 = EC2Connection(aws_access_key_id='user-
name',aws_secret_access_key='password')
# this is user-name with which i login to Amazon Console
print conn1
# This prints: ec2.us-east-1.amazonaws.com
regions = conn1.get_all_regions()
print regions

But while get_all_regions fails with below error: raise
self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 401 Unauthorized
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to
validate the provided access credentials</
Message></Error></Errors><RequestID>a83e822a-6150-44f3-9b4c-
f8f513563e98</RequestID></Response>


Can you please help?


Saju M

unread,
Jul 22, 2013, 8:28:08 AM7/22/13
to boto-...@googlegroups.com

Use access and secret access key instead of username and password of ec2 web console

--
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+...@googlegroups.com.
To post to this group, send email to boto-...@googlegroups.com.
Visit this group at http://groups.google.com/group/boto-users.
For more options, visit https://groups.google.com/groups/opt_out.


Sailendra Varma

unread,
Sep 24, 2015, 10:18:03 AM9/24/15
to boto-users, ahir...@gmail.com
Hi ajay,

even am getting the same error. have the issue been resolved?
 connecting to ec2  for the first time.
could u guide me?
Reply all
Reply to author
Forward
0 new messages