forward3d/cap-ec2 — pull request #18 by ronny (2014-04-02 00:12:24+00:00)
Title: Select running instances by state name instead of code

I've experienced a strange occurrence of the AWS SDK not including a running instance when filtered with instance-state-code=16, but it selected the instance when I changed the filter to using instance-state-name=running.

This change has the added benefit of making the code more readable as well by not having a magic number.

Reference: http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstanceStatus.html