Yasser
Yasser

Reputation: 1369

Expand Root Volume when Creating Ec2 from API

if you are creating an EC2 from Nodejs api call Runinstances

I found it tricky to expand the root volume if you are creating an EC2 from AMI comes with low disk Space 8GB usually I you use

using this block will add another EBS Volume to the EC2 without expanding the root volume

 BlockDeviceMappings: [
 {
   DeviceName: "/dev/sdh", 
   Ebs: {
   VolumeSize: 100
}

} ],

what can we do to Expand the root volume ?

Upvotes: 1

Views: 173

Answers (2)

asvignesh
asvignesh

Reputation: 788

Even I have some issue while calling run-instances, I wanted to exclude some volume but it's not possible in the run-instance but if you do the operation through AWS Console, AWS UI allows doing the same like expand the volume and exclude volume

You can launch the instance using the run-instance and do the volume modify and increase the size of the volume in another command.

if you find any other solution, please let me also know by answering the below question Exclude EBS volume while create instance from the AMI

Upvotes: 0

Kush Vyas
Kush Vyas

Reputation: 6079

Have you tried modifyVolume(params = {}, callback) ⇒ AWS.Requestand you can also modify volume attribute by modifyVolumeAttribute(params = {}, callback) ⇒ AWS.Request.

It is mentioned in same documentation link you have shared.

Thanks

Upvotes: 1

Related Questions