| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The EC2 Block Device Mapping type is an embedded property of the AWS::EC2::Instance type.
{
"DeviceName" : String,
"Ebs" : EC2 EBS Block Device,
"NoDevice" : {},
"VirtualName" : String
} The name of the device within Amazon EC2.
Required: Yes.
Type: String.
Required: Conditional. You can specify either VirtualName or Ebs, but not both.
Type: EC2 EBS Block Device.
This property can be used to unmap a defined device.
Required: No.
Type: an empty map: {}.
The name of the virtual device. The name must be in the form
ephemeral where X X is a number
starting from zero (0); for example, ephemeral0.
Required: Conditional. You can specify either VirtualName or Ebs, but not both.
Type: String.
This example sets the EBS-backed root device (/dev/sda1) size to 50 GiB, and another EBS-backed device mapped to /dev/sdm that is 100 GiB in size.
"BlockDeviceMappings" : [
{
"DeviceName" : "/dev/sda1",
"Ebs" : { "VolumeSize" : "50" }
},
{
"DeviceName" : "/dev/sdm",
"Ebs" : { "VolumeSize" : "100" }
}
] This example maps an ephemeral drive to device /dev/sdc.
"BlockDeviceMappings" : [
{
"DeviceName" : "/dev/sdc",
"VirtualName" : "ephemeral0"
}
] To unmap a device defined in the AMI, set the NoDevice property to an empty map, as shown here:
{
"DeviceName":"/dev/sde",
"NoDevice": {}
} Amazon EC2 Instance Store in the Amazon Elastic Compute Cloud User Guide