-
Bug
-
Resolution: Fixed
-
Major
-
None
EC2Provider does instance pooling, which means instances will be left running.
Stephen had a great idea that we should make those instances self-terminate after certain inactivity.
We can define "activity" in various ways, but for example we could have cron touch a marker file if it finds active SSH sessions, and then have the instance shutdown if the marker file is older than say a few hours.
As for how to make instances terminate automatically when they go down, see http://stackoverflow.com/questions/10541363/self-terminating-aws-ec2-instance
Fixed. First every ec2 instance is configured to terminate by configuring InstanceInitiatedShutdownBehavior attribute and then a nohup bash script is executed that will check periodically for inactivity and shutdown ec2 instance in case of inactivity.