import boto.ec2import boto.ec2.elb
elb_connection = boto.ec2.elb.connect_to_region('ap-southeast-1')ec2_connection = boto.ec2.connect_to_region('ap-southeast-1')
I'm using boto 2.4.1 and I'm attempting to grab all the addresses for the instances in a load balancer and I've ended up with this:import botofrom boto import ec2from boto.regioninfo import RegionInfoACCESS_KEY_ID = '*****'SECRET_ACCESS_KEY = '********'
reg = RegionInfo(name='ap-southeast-1',conn = boto.connect_elb(aws_access_key_id=ACCESS_KEY_ID,aws_secret_access_key=SECRET_ACCESS_KEY,region=reg)ec2_connection = boto.ec2.connection.EC2Connection(aws_access_key_id=ACCESS_KEY,aws_secret_access_key=SECRET_ACCESS_KEY,region=reg)instances = [ instance.id for instance in conn.get_all_load_balancers()[3].instances ]# instances is now [u'i-62448d36'], so far so good.ec2_connection.get_all_instances(instances)But I'm now getting back an error suggesting that AWS isn't liking get_all_instances:<ErrorResponse xmlns="http://webservices.amazon.com/AWSFault/2005-15-09"><Error><Type>Sender</Type><Code>InvalidAction</Code><Message>Could not find operation DescribeInstances for version 2012-03-01</Message></Error><RequestId>c6aab70d-b22b-11e1-a990-a747bbde9f63</RequestId></ErrorResponse>
Any way I can get around that?--
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/-/UqX1awd4lAIJ.
To post to this group, send email to boto-...@googlegroups.com.
To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.