Something needs to be said about creating an AMI from an instance that is not stopped. It is allowed in the AWS API, but basically gives an undefined result: It simply takes some snapshot of the hard drive contents, while the file system is mounted.

Either this API call should stop the instance implicitly (good idea) and document it, or we should document that the user probably wants to stop the instance before calling this function.