I have the following setup using Bamboo OnDemand:
- An AMI containing everything I need to perform builds, derived from the Windows: EBS x86_64 (windows) (stock image).
- An Elastic Instance Configuration which terminates all elastic instances at 8 PM.
- An Elastic Instance Configuration which increases the number of elastic instances to 1 at 7 AM.
I start and stop the elastic instance created from my AMI in order to save costs on my Amazon bill. This works nicely, apart from the fact that old EBS volumes are not automatically removed.
Every week I now have a recurring manual task which requires me to log in to the Bamboo configuration panel, navigate to the disconnected instances and click the "Delete all" link at the right top side of the page to clean up those old EBS volumes.
If an elastic instance is terminated, I have no longer any need for the attached volume. Everything is contained within my AMI and I want to make sure I start from a fresh copy.
How can I automate this? I could not seem to find a setting which removes the old volume after the instance has been terminated. Should this be configured on the Amazon side, or on the Bamboo side?