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
Ran into this issue myself today, probably to late for the original poster, but in case anyone else stumbles across this question later I did the following:
import boto3
ec2 = boto3.resource('ec2',
region_name='eu-west-1',
aws_access_key_id='my-key',
aws_secret_access_key='my-secret')
instance = ec2.create_instances(ImageId='my-image-id',
BlockDeviceMappings=[{"DeviceName": "/dev/xvda","Ebs" : { "VolumeSize" : 50 }}])
The above has been truncated (you'll need to pass more arguments to create_instances for other values, InstanceType etc.) but essentially pass the root device (/dev/xvda in this case) in as part of the BlockDeviceMappings value with the desired volume size (50GB in the above example).