Created
November 13, 2013 20:51
-
-
Save ninjascribble/7456178 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2.describeInstances(params, handleResponse); | |
function handleResponse(err, data){ | |
if (err) { | |
console.log("Error", err); | |
return; | |
} | |
else { | |
var status = data.Reservations[0].Instances[0].State; | |
console.log("Status: ", status); | |
if (status != 'running') { | |
ec2.describeInstances(params, handleResponse); | |
} | |
else { | |
// hooray! do something else now | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment