Use Boto to get ec2 instance status

user2836163 picture user2836163 · Dec 11, 2013 · Viewed 19.5k times · Source

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?..

Answer

garnaat picture garnaat · Dec 11, 2013

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.