aws ec2 detach-volume
Detaches an EBS volume from an instance. AWS CLI reference
5 options Its page in the AWS CLI reference
Options
--deviceThe device name.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--forceForces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally).--instance-idThe ID of the instance.--volume-idThe ID of the volume.