EC2 Detach EBS Volume

Amazon Web Services (AWS)’s Elastic Compute Cloud (EC2) is a commercial web service that allows users to rent virtual computers. Using AWS EC2’s cloud infrastructure, you can build powerful servers in the cloud. This service completely eliminates the need to set up and invest in hardware, enabling you to deploy your apps quickly. With AWS EC2, you can set up servers, configure networking and security, and manage storage.

Amazon Machine Image (AMI) is your virtual machine’s software configuration. It includes elements such as operating system, application server, and applications. 

An instance is nothing but a virtual machine. AWS offers a variety of instance types, which are various combinations of CPU, storage, memory, networking capacity, and so on.  

Amazon Elastic Block Store (EBS) provides block level storage volumes that you can use with your EC2 instances. You can attach an EBS volume to any running EC2 instance and can use it as primary storage for databases, file systems, or any app that requires frequent updates and quick access to the data.

If you want to detach a particular EBS volume from an EC2 instance, you can do so by using this action. However, before you detach a volume, it is important to unmount the volume first. This will ensure that there is no data loss or damage to the volume.

To detach an EBS volume, you first need to configure the action, and select the required AWS connection. Select the region in which the new EBS volume and your EC2 instance reside. In the next field ‘Volume ID’, enter the ID of the EBS volume that needs to be detached. Then, in the ‘Instance ID’ filed, specify the ID of the EC2 instance from which you wish to detach the EBS volume. Also mention the device name.

ec2-detach-ebs-volume

You can set ‘Force’ to true to forcefully detach the EBS volume, if the previous attempt to detach normally failed. You can also perform a dry run to check if you have the required permissions to perform this action.

Once you have entered all the required details, click on ‘Done’ and run the workflow. This will detach the EBS volume from the given EC2 instance.

Output:
  • output-arrow aws-128 EC2 Detach EBS Volume
    • left-triangle VolumeId string
    • left-triangle InstanceId string
    • left-triangle Device string
    • left-triangle State string