Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description


Docker container that attaches an EBS volume to the local ec2 instance. Detaches volume on exit.


docker run -it --rm leg100/ebs-attach \
--volumeid vol-123123 \
--device /dev/xvdf \
--region eu-west-1

Note: it relies on the ec2 instance possessing an IAM profile with the following privileges:

  • ec2:AttachVolume
  • ec2:DetachVolume
  • ec2:DescribeVolumes
Docker Pull Command
Source Repository

Comments (3)
2 years ago

@leg100 I have the following IAM policy in place.

"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"Action": "",
"Resource": "

2 years ago

@cpdiehl Does your VM have an IAM role associated with it? You'll need one with the ec2:AttachVolume and ec2:DetachVolume permissions.

2 years ago

When "Couldn't find auth credentials handler, trying again" is happening, what is the most likely cause of that exception? It's not clear to me. I've got a VM running in AWS that I've spun up with Docker Machine and I'd like to run this container to mount an EBS volume on the VM. I tried executing this 'docker run' command on the VM itself to no avail.