我正在使用boto,代码如下:
dev_xvdb = boto.ec2.blockdevicemapping.EBSBlockDeviceType(volume_id='vol-xxxxxx')
bdm = boto.ec2.blockdevicemapping.BlockDeviceMapping()
bdm['/dev/xvdb'] = dev_xvdb
rs = ec2.request_spot_instances(price=MY_MAX_PRICE,
image_id='ami-xxxxx',
count=1,
type='one-time',
key_name='MY_KEY_NAME',
security_groups=['default'],
instance_type='t1.micro',
block_device_map=bdm)
此代码可以正常运行,但无法附加 EBS 卷(id=vol-xxxxxx)。为什么?