As of December 2011, if you have an AWS premium account you can use CloudWatch to monitor your estimated charges and if they go over a certain limit you can trigger different actions (such as shutting down the machine)
So here is a basic script I've put together in Python which will sit and monitor the current price of your instance, and shut it down if it goes over a certain price-limit. (In the future, this can be changed to maybe throttling incoming bandwidth, or emailing the admin).
We regularly estimate the total monthly charge for each AWS service
that you use. When you enable monitoring for your account, we begin
storing the estimates as CloudWatch metrics, where they'll remain
available for the usual 14 day period. [...]
As outlined in the introductory blog post, You can start by using the billing alerts to let you know when your AWS bill will be higher than expected, see Monitor Your Estimated Charges Using Amazon CloudWatch for more details regarding this functionality.
This is already pretty useful for many basic needs, however, using the CloudWatch APIs to retrieve the stored metrics yourself (see the GetMetricStatistics API and Getting Statistics for a Metric for usage samples) actually allows you to drive arbitrary workflows and business logic based upon this data.
Regarding the latter, the scope of this offering is stressed as well though:
It is important to note that these are estimates, not predictions. The
estimate approximates the cost of your AWS usage to date within the
current billing cycle and will increase as you continue to consume
resources. [...] It does not take trends or potential changes in your AWS usage pattern
into account. [emphasis mine]