-
-
Save gregtaylor99/c83ea7d946e18a26851883e619e778cc to your computer and use it in GitHub Desktop.
self volume attaching within EC2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instId=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
deviceName='/dev/sdz' | |
volId='vol-97f21469' | |
region='ap-northeast-1' | |
mountPoint='/o' | |
aws --region $region ec2 attach-volume --device $deviceName --volume-id $volId --instance-id $instId && \ | |
mount $deviceNmae $mountPoint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment