Skip to content
v2.274.0

LaunchTemplateCpuOptions Struct ​

The CPU options for the instance.

Example ​

ts
new ec2.LaunchTemplate(this, 'LaunchTemplate', {
  machineImage: ec2.MachineImage.latestAmazonLinux2023(),
  cpuOptions: {
    coreCount: 4,
    threadsPerCore: 1,
    nestedVirtualization: true,
  },
});

Properties ​

amdSevSnpbooleanamd_sev_snpboolamdSevSnpBooleanAmdSevSnpboolAmdSevSnp*bool#
Indicates whether to enable the instance for AMD SEV-SNP.

Default: AMD SEV-SNP is not specified in the launch template.

AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only.

coreCountnumbercore_countint | floatcoreCountNumberCoreCountdoubleCoreCount*float64#
The number of CPU cores for the instance.

Default: The default number of CPU cores for the selected instance type.

nestedVirtualizationbooleannested_virtualizationboolnestedVirtualizationBooleanNestedVirtualizationboolNestedVirtualization*bool#
Indicates whether the instance is enabled for nested virtualization.

Default: Nested virtualization is not specified in the launch template.

threadsPerCorenumberthreads_per_coreint | floatthreadsPerCoreNumberThreadsPerCoredoubleThreadsPerCore*float64#
The number of threads per CPU core.

Default: The default number of threads per core for the selected instance type.

To disable multithreading for the instance, specify a value of 1. Otherwise, specify the default value of 2.