Question: I cannot figure out from [documentation](http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances) and source code how to define size of the root device.

You can specify N additional block devices using BlockDeviceMappings section where you can declare their sizes. But there is no way to set size of the root volume. So it always create an instance with root volume of size 8GB which is the default value.

Answer: 
Follow is minimal required fields that have to be set the size of the root device: 

```
import boto3
ec2_resource = boto3.resource('ec2')
    reservations = ec2_resource.create_instances(

        ImageId= "ami-xyz",
        MinCount=1,
        MaxCount=1,
        InstanceType='xyz',
        KeyName='key-pair',
        TagSpecifications=[
            {
                'ResourceType': 'instance',
                'Tags': [{
                     'Key': 'Name',
                    'Value': 'xyz-machine'
                }]
            }
        ],
        IamInstanceProfile={
        'Name':'xyz-role'
        },
        BlockDeviceMappings=[
            {
                'DeviceName': '/dev/sda1',
                'Ebs': {
                    'VolumeSize': 30,
                    'VolumeType': 'standard'
                }
            }
        ]
    )

```
See [Stackoverflow: How to launch EC2 instance with Boto, specifying size of EBS?](https://stackoverflow.com/questions/13585857/how-to-launch-ec2-instance-with-boto-specifying-size-of-ebs)

Also, here's a way to do it from the [AWS Command-Line Interface (CLI)](http://aws.amazon.com/cli/):

```
aws ec2 run-instances --image-id ami-xxxxxxxx --instance-type m1.xlarge --block-device-mappings '{"DeviceName": "/dev/sda1","Ebs" : { "VolumeSize" : 50 }}'

```