dev_sda1 = boto.ec2.blockdevicemapping.EBSBlockDeviceType()dev_sda1.size = 50 # size in Gigabytesbdm = boto.ec2.blockdevicemapping.BlockDeviceMapping()bdm['/dev/sda1'] = dev_sda1
之后,您可以在
run_instances呼叫中提供块设备映射:
reservation = ec2.run_instances( image_id=AMI_ID, key_name=EC2_KEY_HANDLE, instance_type=INSTANCE_TYPE,security_groups = [ SECGROUP_HANDLE, ],block_device_mappings = [bdm])
不幸的是,这没有得到很好的记录,但是可以在源代码中找到该示例。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)