Use Boto to get ec2 instance status

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.


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