EC2 EBS volume shows "no attachments" but still "in-use". Won't detach or force-detach


I have an EC2 EBS volume that won't detach or force-detach

D:\repos> aws ec2 describe-volumes
    "Volumes": [
            "AvailabilityZone": "us-east-1b",
            "Attachments": [],
            "Encrypted": false,
            "VolumeType": "standard",
            "VolumeId": "vol-cd8365a4",
            "State": "in-use",
            "SnapshotId": "",
            "CreateTime": "2009-03-17T23:20:21.000Z",
            "Size": 20

I have no instances running in us-east-1b, so it can't be attached to anything. It won't detach or force detach.

If I try to detach it, it says the volume is 'in-use'

D:\repos> aws ec2 delete-volume --volume-id vol-cd8365a4

An error occurred (IncorrectState) when calling the DeleteVolume operation: The volume 'vol-cd8365a4' is 'in-use'

If I try to force detach it, it says the volume is in the 'available state'

D:\repos> aws ec2 detach-volume --force --volume-id vol-cd8365a4

An error occurred (IncorrectState) when calling the DetachVolume operation: Volume 'vol-cd8365a4' is in the 'available' state.

Is there anyway to get rid of this? I'm being billed monthly for it.

3 個答案

I found the answer!

I was doing nothing wrong, and Amazon had a bug. I was able to get someone at Amazon tech support to kick the thing for me and unstick it. Because I don't pay for support, I filed an issue with "billing" as I was being billed for a volime that couldn't be deleted.

EC2 "volumes" really do get stuck and can't be force-detached and the only option is to get technical support from Amazon.

已回答 1 年前
profile picture
已審閱 4 個月前

Are you able to get more details about the volume using AWS Config? A query something like the below and then looking at the configuration to see if it gives you any additional data?

  resourceId,  resourceName,  resourceType,  tags,  configuration
  resourceType = 'AWS::EC2::Volume'
  and resourceId = 'vol-cd8365a4'
已回答 1 年前
  • Thanks for the idea. It didn't give me any more information. Shows as "in-use" with no attachements

      "aggregator": "none",
      "expression": "SELECT  resourceId,  resourceName,  resourceType,  tags,  configurationWHERE  resourceType = 'AWS::EC2::Volume'  and resourceId = 'vol-cd8365a4'",
      "creationTime": "Fri Apr 28 2023 12:46:15 GMT-0700 (Pacific Daylight Time)",
      "count": 1,
      "results": [
          "resourceId": "vol-cd8365a4",
          "configuration": {
            "volumeType": "standard",
            "attachments": [],
            "snapshotId": "",
            "availabilityZone": "us-east-1b",
            "tags": [],
            "encrypted": false,
            "size": 20,
            "createTime": "2009-03-17T23:20:21.000Z",
            "volumeId": "vol-cd8365a4",
            "state": {
              "value": "in-use"
            "multiAttachEnabled": false
          "tags": [],
          "resourceType": "AWS::EC2::Volume"
    } ```

Just a thought, is your account's "home" region in your config/env settings the same region as the volume is in (us-east-1)? If it isn't then maybe append --region us-east-1 to the command.

If you think this is superfluous then I agree, as Resource IDs should be globally unique. But it's surely worth a try.

profile picture
已回答 1 年前

您尚未登入。 登入 去張貼答案。