The EC2 plugin for Maven 2 allows starting and stopping Amazon EC2 images as part of your build.
See Plugin Usage.