I'm using boto/python to launch a new EC2 instance that boots from an EBS volume. At the time I launch the instance, I'd like to override the default size of the booting EBS volume.
I found no boto methods or parameters that might fit into my launch code:
ec2 = boto.connect_ec2( ACCESS_KEY, SECRET_KEY, region=region )
reservation = ec2.run_instances( image_id=AMI_ID,
key_name=EC2_KEY_HANDLE,
instance_type=INSTANCE_TYPE,
security_groups = [ SECGROUP_HANDLE, ] )
This web page shows how to increase the size of a running EC2-instance's EBS volume using command-line tools, but I'd like to use boto at the time the EC2 instance is specified:
/dev/sda1
to/dev/xvda1
because, on the Ubuntu instances that I run, that is the name of the boot volume, according to thedf -h
command. For whatever reason, that failed with the error message: "Invalid device name /dev/xvda1" So I changed it back to/dev/sda1
and all went well. – Reserve