How to specify root volume size of core-os ec2 instance using boto3?

后端 未结 4 2219
礼貌的吻别
礼貌的吻别 2021-02-05 17:39

I cannot figure out from documentation and source code how to define size of the root device.

You can specify N additional block devices using BlockDeviceMappings sectio

4条回答
  •  眼角桃花
    2021-02-05 18:11

    See Stackoverflow: How to launch EC2 instance with Boto, specifying size of EBS?

    Also, here's a way to do it from the AWS Command-Line Interface (CLI):

    aws ec2 run-instances --image-id ami-xxxxxxxx --instance-type m1.xlarge --block-device-mappings '{"DeviceName": "/dev/sda1","Ebs" : { "VolumeSize" : 50 }}'
    

提交回复
热议问题