How to check if AWS instance is really available
<p>I'm starting new AWS instance (with Windows) from code:</p>

<pre><code>RunInstancesResponse launchResponse = ec2Client.RunInstances(launchRequest);
</code></pre>

<p>Then I'm requesting it's state: </p>

<pre><code>   var instanceRequest = new DescribeInstancesRequest();
   var response = ec2Client.DescribeInstances(instanceRequest);
</code></pre>

<p>And when state is 16/Running I'm trying to connect to this instance, but it fails. Later it is possible to connect.
In the AWS console I see 'Status Checks' that start running when image get status 'Running' and I think when 'Status Checks' are completed image become really available.</p>