Skip to content
v2.278.0

EbsDeviceVolumeType Enum ​

Supported EBS volume types for blockDevices.

Example ​

ts
const imageRecipe = new imagebuilder.ImageRecipe(this, 'BlockDeviceImageRecipe', {
  baseImage: imagebuilder.BaseImage.fromSsmParameterName(
    '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
  ),
  blockDevices: [
    {
      deviceName: '/dev/sda1',
      volume: ec2.BlockDeviceVolume.ebs(100, {
        encrypted: true,
        volumeType: ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
      })
    }
  ]
});
python
image_recipe = imagebuilder.ImageRecipe(self, "BlockDeviceImageRecipe",
    base_image=imagebuilder.BaseImage.from_ssm_parameter_name("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"),
    block_devices=[ec2.BlockDevice(
        device_name="/dev/sda1",
        volume=ec2.BlockDeviceVolume.ebs(100,
            encrypted=True,
            volume_type=ec2.EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
        )
    )
    ]
)
java
ImageRecipe imageRecipe = ImageRecipe.Builder.create(this, "BlockDeviceImageRecipe")
        .baseImage(BaseImage.fromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"))
        .blockDevices(List.of(BlockDevice.builder()
                .deviceName("/dev/sda1")
                .volume(BlockDeviceVolume.ebs(100, EbsDeviceOptions.builder()
                        .encrypted(true)
                        .volumeType(EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3)
                        .build()))
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var imageRecipe = new ImageRecipe(this, "BlockDeviceImageRecipe", new ImageRecipeProps {
    BaseImage = BaseImage.FromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"),
    BlockDevices = new [] { new BlockDevice {
        DeviceName = "/dev/sda1",
        Volume = BlockDeviceVolume.Ebs(100, new EbsDeviceOptions {
            Encrypted = true,
            VolumeType = EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3
        })
    } }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
imageRecipe := imagebuilder.NewImageRecipe(this, jsii.String("BlockDeviceImageRecipe"), &ImageRecipeProps{
	BaseImage: imagebuilder.BaseImage_*FromSsmParameterName(jsii.String("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64")),
	BlockDevices: []BlockDevice{
		&BlockDevice{
			DeviceName: jsii.String("/dev/sda1"),
			Volume: ec2.BlockDeviceVolume_Ebs(jsii.Number(100), &EbsDeviceOptions{
				Encrypted: jsii.Boolean(true),
				VolumeType: ec2.EbsDeviceVolumeType_GENERAL_PURPOSE_SSD_GP3,
			}),
		},
	},
})

Members ​

MemberDescription
STANDARDMagnetic.
IO1Provisioned IOPS SSD - IO1.
IO2Provisioned IOPS SSD - IO2.
GP2General Purpose SSD - GP2.
GP3General Purpose SSD - GP3.
ST1Throughput Optimized HDD.
SC1Cold HDD.

Referenced by ​