Any special reason why you haven't used something like libcloud (deploy_node ...) - http://libcloud.apache.org/?
Then the script would work with multiple providers, not just Amazon.
Then the script would work with multiple providers, not just Amazon.