Attach an existing EBS volume to an instance.
Section: EBS Volumes and Snapshots
Attach a volume
bash
bash
aws ec2 attach-volume --volume-id vol-0123456789abcdef0 --instance-id i-0123456789abcdef0 --device /dev/xvdfExplanation
The operating system still needs filesystem and mount configuration if appropriate.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing EBS Volumes and Snapshots