# CpuOptionsProperty

Specifies the CPU options for the instance.

When you specify CPU options, you must specify both the number of CPU cores and threads per core.

Modifying the CPU options for an instance results in instance [replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) .

For more information, see [Optimize CPU options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) in the *Amazon Elastic Compute Cloud User Guide* .

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cpuOptionsProperty: ec2.CfnInstance.CpuOptionsProperty = {
  coreCount: 123,
  threadsPerCore: 123,
};
```

## Properties

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

- `threadsPerCore`: number — The number of threads per CPU core.
