AWS EBS: delete unattached volumes

An EBS volume in the available state is still billed per provisioned GB. How to list them with the CLI, snapshot, delete and prevent them with Terraform.

An EBS volume in the available state is not attached to any instance, but AWS still bills every provisioned GB until you delete it.

Policy at a glance

Provider
AWS
Resource
Amazon EBS volumes (gp3, gp2, io1, io2, st1, sc1).
What to check
Volumes in the available state, meaning no instance is using them.
Risk
Low with a snapshot first. Deletion is permanent: without a snapshot, the data is gone.
Effort
Low: one query per region and one delete per volume.

Why it matters: EBS bills what you provision, not what you use

The Amazon EBS pricing page puts it plainly: you pay only for what you provision, and storage for every volume type is charged by the GB you provision per month until you release that storage. It does not matter whether the volume is attached to a running instance, a stopped one or none at all: as long as it exists, it bills.

An unattached volume shows up in the console and the API with the state available. It is the typical leftover after terminating an instance whose data disks were not marked to be deleted with it, after a detach for a test nobody reverted, or after restoring a volume from a snapshot "just in case".

To size the problem, the examples on that same page (read on 15 November 2026; the region is not named and rates vary by region) price gp3 at USD 0.08 per GB-month and gp2 at USD 0.10 per GB-month. At those rates, a forgotten 500 GB gp3 volume is about USD 40 a month, every month. On io1 and io2 you also pay for provisioned IOPS: USD 0.065 per IOPS-month in the example, also until the volume is released.

Billing is per second with a 60-second minimum, so deleting today saves from today: there is no need to wait for the end of the month.

How to find them

In the console: EC2 → Elastic Block Store → Volumes, then filter by Volume state = Available. The Created column tells you how long each one has existed, which is the first fact you need to decide.

With the official CLI, describe-volumes accepts the status filter. This command lists the unattached volumes in the configured region with their size, type and creation date:

aws ec2 describe-volumes \
  --filters Name=status,Values=available \
  --query "Volumes[*].{ID:VolumeId,GB:Size,Type:VolumeType,Created:CreateTime}" \
  --output table

Volumes are regional: repeat the query in every region you use (with --region). To confirm the state of a specific one before touching it, the EBS guide uses aws ec2 describe-volumes --volume-id vol-0123... --query Volumes[*].State --output text: in-use means attached, available means not.

How to fix it, step by step

Terraform example: detect and prevent

Two pieces. The AWS Config managed rule EC2_VOLUME_INUSE_CHECK flags as NON_COMPLIANT every volume that is not attached to an instance (or is attached to a terminated one); it needs an active configuration recorder in the account. And on the instance, delete_on_termination = true on every disk declared with it makes them go away together with the instance.

variable "ami_id" { type = string }

# Detect: AWS Config managed rule.
resource "aws_config_config_rule" "ebs_sin_adjuntar" {
  name = "ec2-volume-inuse-check"
  source {
    owner             = "AWS"
    source_identifier = "EC2_VOLUME_INUSE_CHECK"
  }
}

# Prevent: disks declared with the instance are deleted with it.
resource "aws_instance" "app" {
  ami           = var.ami_id
  instance_type = "t3.micro"

  root_block_device {
    volume_type           = "gp3"
    delete_on_termination = true
  }

  ebs_block_device {
    device_name           = "/dev/sdf"
    volume_size           = 50
    volume_type           = "gp3"
    delete_on_termination = true
  }
}

Validated with terraform validate (Terraform 1.17.2, hashicorp/aws provider 6.73.0). If your team reviews plans with Open Policy Agent, the same rule can be written in Rego to stop an aws_ebs_volume with no aws_volume_attachment before apply.

How Control Cloud surfaces it

Control Cloud reads the EBS volumes of every region with a read-only credential and flags the ones with no instance as orphans: the node is marked on the canvas and the volumes tab has an "Orphans" filter with its count. If the attachment data did not arrive complete, the volume stays "unknown" instead of orphan, because a false flag invites deleting something in use. And when the deletion is done from the app, it is refused while the volume is still attached: it never forces a detach.

When not to apply it

Frequently asked questions

Does AWS bill an EBS volume that is not attached to any instance?

Yes. According to the EBS pricing page, storage is billed by the GB provisioned per month until you release it, attached or not. On io1 and io2 the provisioned IOPS are billed too.

Why are volumes left behind after terminating an instance?

Because of the DeleteOnTermination attribute. According to the EC2 guide, a root volume attached at launch is deleted by default, but a data volume attached after launch is preserved, and so is a data volume attached at launch from the console. Whatever is preserved keeps billing.

Can I recover an EBS volume after deleting it?

Not the volume itself: the data is gone. You can re-create it from a snapshot if you took one first, or restore it from the Recycle Bin if a retention rule covered it at deletion time.

How much does the snapshot I take before deleting cost?

It is billed for the space the data takes, not for the size of the volume: EBS does not store empty blocks, the first snapshot is a full copy of the data and later ones store only what changed. It is almost always much less than keeping the volume.

Related policies: AWS: release unassociated Elastic IPs · Azure: delete unattached managed disks · OCI: delete unattached block volumes

Glossary terms: Snapshot · Terraform · Open Policy Agent (OPA)

Official sources

  1. Amazon EBS — Pricing
  2. Amazon EBS — Delete a volume
  3. Amazon EC2 — Preserve data when an instance is terminated
  4. AWS Config — ec2-volume-inuse-check rule

Ready to see it on your own infrastructure? Book a demo · Read the documentation