When using CloudFormation or the Amazon CLI, please use the following JSON to specify volume sizes and encryption options on your new EC2 instance:
"ec2-instance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"ImageId": "ami-xxxxxxxxx",
"InstanceType": "t2.small",
"KeyName": "my-ec2-keypair",
"BlockDeviceMappings": [
{ "DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination":"true",
"VolumeType":"gp2",
"VolumeSize":"100"
}
},
{ "DeviceName": "/dev/xvdl",
"Ebs": {
"DeleteOnTermination":"true",
"VolumeType":"gp2",
"VolumeSize":"10"
}
},
{ "DeviceName": "/dev/xvdh",
"Ebs": {
"DeleteOnTermination":"true",
"VolumeType":"gp2",
"VolumeSize":"2"
}
},
{ "DeviceName": "/dev/xvdx",
"Ebs": {
"DeleteOnTermination":"true",
"VolumeType":"gp2",
"VolumeSize":"2"
}
},
]
}
}
If you are creating EC2 instances from the Amazon console, override the default volume sizes on Page 4 of the Launch Instance wizard.
(If you prefer an EC2 instance with a single root volume, please e-mail [email protected] and let us know. We're happy to accommodate!)