I recently started working on a sandbox project called AWS EC2 Remote Management Module: http://drupal.org/sandbox/markwk/1442412. The goal was/is to be able to remotely managed EC2 instances from within a Drupal 7 Site. It use aws php adk module/library and it works quite well for starting and stopping an instance in various regions.
Anyways, it manages to do exactly what I asked about previously here: http://groups.drupal.org/node/139744#comment-677398. Unfortunately, the code still isn't quite generalized enough for release on d.o. and contains one or two specific integration points.
Question: I've run into an issue with domain names. AWS changes the address for the server pretty much every time it gets turned on and off. Does anyone know how I can get it stay on a set address so on/off keeps the same address? Do I need to point some DNS record to the server, for example?
Thanks in advance...
PS -- If anyone is willing to volunteer a code review, I'll push my code sooner for EC2 Management Module.

Comments
sdk describe_instances method
@markwk,
Each time a box is stopped or spun up from a snapshot, AWS assigns new resources to it regardless of whether the instance existed previously or was stopped and restarted. This is why they term their IP allocation (as well the whole EC2 structure) "Elastic".
if you are using the aws php sdk then you can $ec2->describe_instances() to get the current internal and public DNS values for the machines. You can also filter for values that you have tagged on the description as well as name tags to get the correct resource. The sdk examples should give you some hints, but here is a section of some code I have been using.
http://docs.amazonwebservices.com/AWSSDKforPHP/latest/#m=AmazonEC2/descr...
$response = $ec2->describe_instacnes(array('Filter' => array(
array('Name' => 'status', 'Value' => 'running'),
),
));
We experienced the problem you described several times and by using this function we can loop through the results and grab the necessary ip's to then do our bidding both from within the internal firewall and outside. Other than this, another approach to managing the changing resource DNS would be to use something like Chef (or Puppet) and we are beginning to leverage that heavily. But of course that is really outside the scope of managing things in Drupal.
We've never needed to manage our servers through something like Drupal so my use cases are not the same as yours, but the SDK is very powerful at this point so you should be able to achieve much of what you need to do with the returned XML
If you post back to this thread, I will be reminded that the code needs review and will do my best to provide feedback or identify bugs, but please specify a little more of what you are trying to achieve.
Goal: starting and stopping a
Goal: starting and stopping a video chat server for a school. Will post code soon