EBS: Delete Unattached Volumes

Service
EBS
difficulty
Easy
Easy
Medium
Hard
Zero downtime, zero performance risk
Zero downtime, potential performance trade-offs
Downtime required, potential performance trade-offs

Even after the associated EC2 instances stop running, unused EBS Volumes may continue to incur expenses. It is recommended to consider deleting non-used EBS volumes to reduce your monthly AWS bill.

EBS Pricing

Need help reducing cloud cost waste?

Cloudthread can help

Nonstop cost optimization analysis
Group and attribute to owners
Embed in engineering workflows with Jira, Slack, GitHub integration
Attribute savings and track progress
Enter your email below and we'll reach out immediately
Thank you! Your submission has been received!
We will reach you soon!
Oops! Something went wrong while submitting the form. Please try again later!

Evaluation

Cloudthread Platform Instructions

Note: This will show you all unattached EBS volumes across all accounts and all regions.

  1. Login to the Cloudthread platform and navigate to Opportunities Savings Explorer.
  2. Click the “Category” filter, check “Unattached EBS Volumes”, and click OK.
Unattached EBS Volumes

Console Instructions

Note: You’ll have to repeat the below steps for each account and region.

1. Login to your AWS Management Console and navigate to the EC2 dashboard.

2. From the left-hand menu, select 'Volumes' under the 'Elastic Block Store' section.

Elastic Block Store

3. This will display a list of all the volumes in your account. Search for any volumes that have the "available" status, which means they are unattached.

Volume state: available

4. Volumes that have an available state means that they are currently unused (unattached) by any instance.

CLI Instructions:

1. Run the describe-volumes command, to list all the unused EBS volumes in your cloud environment:

 
aws ec2 describe-volumes --region  --
--filters Name=status,Values=available

 

2. Configure data for each detected unused EBS volume should be returned as output:

 {
    "Volumes": [
        {
            "Attachments": [],
            "AvailabilityZone": "",
            "CreateTime": "2022-12-02T12:01:41.088000+00:00",
            "Encrypted": false,
            "Size": 8,
            "SnapshotId": "snap-09328b730a42039c6",
            **"State": "available",**
            "VolumeId": "vol-0b810c6c7e4a334cb",
            "Iops": 100,
            "Tags": [
                {
                    "Key": "Name",
                    "Value": "Mike_ZF1"
                }
            ],
            "VolumeType": "gp2",
            "MultiAttachEnabled": false
        },
        {
            "Attachments": [],
            "AvailabilityZone": "",
            "CreateTime": "2022-12-13T04:20:57.505000+00:00",
            "Encrypted": false,
            "Size": 50,
            "SnapshotId": "snap-0415d8298c7099b66",
            **"State": "available",**
            "VolumeId": "vol-06d24eb6b77f09e70",
            "Iops": 150,
            "VolumeType": "gp2",
            "MultiAttachEnabled": false
        },
				...
        {
            "Attachments": [],
            "AvailabilityZone": ,
            "CreateTime": "2023-02-07T08:29:07.029000+00:00",
            "Encrypted": false,
            "Size": 80,
            "SnapshotId": "snap-0415d8298c7099b66",
            **"State": "available",**
            "VolumeId": "vol-012e179cf459c730e",
            "Iops": 240,
            "VolumeType": "gp2",
            "MultiAttachEnabled": false
        }
]
 
 

Action

Console Instructions:

  1. Login to your AWS Management Console and navigate to the EC2 dashboard.
  2. From the left-hand menu, select 'Volumes' under the 'Elastic Block Store' section.
EBS: Volumes
  1. You will see a list of all volumes in your account, including any unattached volumes. Identify the unattached volumes that you wish to delete.
  2. Select the checkbox next to the unattached volume(s) that you want to delete.
  3. Click the 'Actions' button at the top of the page and select 'Delete volumes' from the drop-down menu.
  4. A confirmation window will appear, asking you to confirm that you want to delete the selected volume(s). Click 'Yes, Delete' to confirm.
  5. The volume(s) will be deleted, and you will receive a confirmation message.

CLI instructions:

1. Open your preferred terminal or command prompt and ensure that you are logged in to your AWS account with the appropriate credentials.

2. Use the following command to list all the available volumes in your account:

 
aws ec2 describe-volumes
 
 

3. The output of the above command will show all the volumes in your account. Look for the volumes that are in the "available" state and have no "Attachments" associated with them. Note down the "VolumeId" of the unattached volumes you want to delete.

4. Use the following command to delete the unattached volumes. Replace the "VolumeId" parameter with the actual ID of the volume you want to delete.

 
 aws ec2 delete-volume --volume-id 
 
 

5. Repeat the above step for all the unattached volumes you want to delete.

6. Once you have deleted all the unattached volumes, you can use the following command to confirm that the volumes are no longer in your account:

 
 aws ec2 describe-volumes
 
 

7. The output of the above command should not show the volumes you have just deleted.

That's it! You have successfully deleted the unattached volumes from your AWS account using the command line interface.

Make cloud costs a first class metric for your engineering organization.
Copyright © 2024 CloudThread Inc.
All rights reserved.