I'm setting up an Ubuntu instance on Amazon EC2 and I'm trying to configure it so that, at startup, it automatically attaches an EBS volume and takes an elastic IP address and, at shutdown, it automatically releases those resources.
I found various init scripts that do what I want, but I'd really like to use an upstart job, so that I can automatically install it through cloud-init.
I understand from this exchange that the event I want to monitor to start my job is, for lucid and maverick
start on stopped cloud-run-user-script
and for natty
start on stopped cloud-final
Is this really accurate? Also, what is the correct event to monitor to stop my job (including unmounting and detaching the EBS volume and releasing the elastic IP)?