# LaunchTemplateCpuOptions

The CPU options for the instance.

- Source: [`aws-ec2/lib/launch-template.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ec2/lib/launch-template.ts#L227)
- Type last changed: v2.268.0 · 2 Sep 2026

## Example

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

## Properties

- `amdSevSnp`: boolean — 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.

- `coreCount`: number — The number of CPU cores for the instance.

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

- `nestedVirtualization`: boolean — Indicates whether the instance is enabled for nested virtualization.

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

- `threadsPerCore`: number — 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.
