interface EbsDeviceOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.EC2.EbsDeviceOptions |
![]() | software.amazon.awscdk.services.ec2.EbsDeviceOptions |
![]() | aws_cdk.aws_ec2.EbsDeviceOptions |
![]() | @aws-cdk/aws-ec2 » EbsDeviceOptions |
Block device options for an EBS volume.
Example
const host = new ec2.BastionHostLinux(this, 'BastionHost', {
vpc,
blockDevices: [{
deviceName: 'EBSBastionHost',
volume: ec2.BlockDeviceVolume.ebs(10, {
encrypted: true,
}),
}],
});
Properties
Name | Type | Description |
---|---|---|
delete | boolean | Indicates whether to delete the volume when the instance is terminated. |
encrypted? | boolean | Specifies whether the EBS volume is encrypted. |
iops? | number | The number of I/O operations per second (IOPS) to provision for the volume. |
kms | IKey | The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. |
volume | Ebs | The EBS volume type. |
deleteOnTermination?
Type:
boolean
(optional, default: true for Amazon EC2 Auto Scaling, false otherwise (e.g. EBS))
Indicates whether to delete the volume when the instance is terminated.
encrypted?
Type:
boolean
(optional, default: false)
Specifies whether the EBS volume is encrypted.
Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption
iops?
Type:
number
(optional, default: none, required for {@link EbsDeviceVolumeType.IO1})
The number of I/O operations per second (IOPS) to provision for the volume.
Must only be set for {@link volumeType}: {@link EbsDeviceVolumeType.IO1}
The maximum ratio of IOPS to volume size (in GiB) is 50:1, so for 5,000 provisioned IOPS, you need at least 100 GiB storage on the volume.
See also: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
kmsKey?
Type:
IKey
(optional, default: If encrypted is true, the default aws/ebs KMS key will be used.)
The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.
You have to ensure that the KMS CMK has the correct permissions to be used by the service launching the ec2 instances.
volumeType?
Type:
Ebs
(optional, default: {@link EbsDeviceVolumeType.GP2})
The EBS volume type.
See also: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html