How to Detach an Amazon EBS Volume from an Instance
An Amazon EBS volume can be detached from an instance by either explicitly detaching the volume or terminating the instance. This example unmounts the volume and explicitly detaches it from the instance. This is useful when you want to terminate an instance or attach a volume to a different instance.
Caution
A volume must be unmounted inside the instance before being detached. Failure to do so will result in damage to the file system or the data it contains.