interface LaunchTemplateCpuOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EC2.LaunchTemplateCpuOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#LaunchTemplateCpuOptions |
Java | software.amazon.awscdk.services.ec2.LaunchTemplateCpuOptions |
Python | aws_cdk.aws_ec2.LaunchTemplateCpuOptions |
TypeScript (source) | aws-cdk-lib » aws_ec2 » LaunchTemplateCpuOptions |
The CPU options for the instance.
See also: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html
Example
new ec2.LaunchTemplate(this, 'LaunchTemplate', {
machineImage: ec2.MachineImage.latestAmazonLinux2023(),
cpuOptions: {
coreCount: 4,
threadsPerCore: 1,
nestedVirtualization: true,
},
});
Properties
| Name | Type | Description |
|---|---|---|
| amd | boolean | Indicates whether to enable the instance for AMD SEV-SNP. |
| core | number | The number of CPU cores for the instance. |
| nested | boolean | Indicates whether the instance is enabled for nested virtualization. |
| threads | number | The number of threads per CPU core. |
amdSevSnp?
Type:
boolean
(optional, default: AMD SEV-SNP is not specified in the launch template.)
Indicates whether to enable the instance for AMD SEV-SNP.
AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only.
See also: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html
coreCount?
Type:
number
(optional, default: The default number of CPU cores for the selected instance type.)
The number of CPU cores for the instance.
nestedVirtualization?
Type:
boolean
(optional, default: Nested virtualization is not specified in the launch template.)
Indicates whether the instance is enabled for nested virtualization.
threadsPerCore?
Type:
number
(optional, default: The default number of threads per core for the selected instance type.)
The number of threads per CPU core.
To disable multithreading for the instance, specify a value of 1. Otherwise, specify the default value of 2.

.NET
Go
Java
Python
TypeScript (