vendredi 27 février 2015

aws cli ec2 instance isn't mounting block device

I am using aws cli to launch an ec2 instance; My command is something like this


aws ec2 run-instances --image-id ami-xxxxxxxx --count 1 --instance-type m3.xlarge --user-data file:///Users/xyz/daytoday/userdata --key-name "xyzxyz" --security-group-ids "sg-xxxxxxxx" --subnet-id subnet-xxxxxxxx --key XYZZZX --iam-instance-profile Name="FOOBAR" --associate-public-ip-address --block-device-mappings "[{\"DeviceName\": \"/dev/sdh\",\"Ebs\":{\"VolumeSize\":200}}]"


I am able to launch the instance with default root volume and the ebs of 200 gb is attached to the instance. No issues. Only problem is I am needing to mount the ebs manually.


[root@ip-10-2-0-34 ec2-user]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 20G 0 disk └─xvda1 202:1 0 20G 0 part / xvdh 202:112 0 200G 0 disk


Is there anyway, I can have the ebs mounted by default; Instead of me mounting manually.





Aucun commentaire:

Enregistrer un commentaire