Force an EBS volume to detach

Earlier in the year I moved my AWS instances from Virginia (us-east-1b) to Dublin. While reviewing the charges for the service i noticed an errant EBS volume hadn't been decommissioned from the Virginia site. Upon further inspection it turned out that the volume was reporting as being attached to 'no' instance. Right clicking and attempting to detach in the aws control panel yielded no result, with an error message indicating I should attempt to force detach.

Long story short, the region nomenclature is a bit different to what i had expected.

$ ec2-detach-volume --region us-east-1b --force vol-242eb54d
Unknown host: https://ec2.us-east-1b.amazonaws.com
[/codefilter_code]

How bizarre! turns out the region is us-east-1, so this command worked:

$ ec2-detach-volume --region us-east-1 --force vol-242eb54d
ATTACHMENT vol-242eb54d detaching 2010-12-30T16:43:44+0000

Huzzah thought I....the volume is no longer attached

$ ec2-describe-volumes --region us-east-1 vol-242eb54d
VOLUME vol-242eb54d 25 us-east-1b available 2010-06-29T07:31:34+0000

this can then be deleted either through the command line or through the aws console.

Add new comment