I'm using instace.update() to get the status, which returns stopped, running or ...
But there is another status in the ec2 web interface which also shows it's initializing or ... 2/2 checks passed.
Is there a way to get the status of initializing?..
EDIT:
status=conn.get_all_instance_status(instance_ids=i-****)
print status[0].system_status.details
or
print status[0].system_status.details["reachability"]
============================================================
OLDER:
This might help you. It tell status about all the instances, you can use simple 'if' for filtering an instance.
import boto;
ec2=boto.connect_ec2()
instances= ec2.get_only_instances()
for instance in instances:
print instance.tags['Name'] , " is ", instance.state
That information comes from the DescribeInstanceStatus
request and is available in boto via the get_all_instance_status
method. See:
http://docs.pythonboto.org/en/latest/ref/ec2.html#boto.ec2.connection.EC2Connection.get_all_instance_status
for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With