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

后端 未结 4 2073
礼貌的吻别
礼貌的吻别 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:09

    Same as Steve Jeffereies has mentioned, naming the DeviceName is the key. I was able to use /dev/sda1 which you would usually see on AWS console. The following is a working example using magnetic,

    BlockDeviceMappings=[
        {
            'DeviceName': '/dev/sda1',
            'Ebs': {
                'VolumeSize': 30,
                'VolumeType': 'standard'
            }
        }
    ]
    

提交回复
热议问题