LaunchTemplateCpuOptions
- class aws_cdk.aws_ec2.LaunchTemplateCpuOptions(*, amd_sev_snp=None, core_count=None, nested_virtualization=None, threads_per_core=None)
Bases:
objectThe CPU options for the instance.
- Parameters:
amd_sev_snp (
Optional[bool]) – Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Default: - AMD SEV-SNP is not specified in the launch template.core_count (
Union[int,float,None]) – The number of CPU cores for the instance. Default: - The default number of CPU cores for the selected instance type.nested_virtualization (
Optional[bool]) – Indicates whether the instance is enabled for nested virtualization. Default: - Nested virtualization is not specified in the launch template.threads_per_core (
Union[int,float,None]) – 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. Default: - The default number of threads per core for the selected instance type.
- See:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html
- ExampleMetadata:
infused
Example:
ec2.LaunchTemplate(self, "LaunchTemplate", machine_image=ec2.MachineImage.latest_amazon_linux2023(), cpu_options=ec2.LaunchTemplateCpuOptions( core_count=4, threads_per_core=1, nested_virtualization=True ) )
Attributes
- amd_sev_snp
Indicates whether to enable the instance for AMD SEV-SNP.
AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only.
- Default:
AMD SEV-SNP is not specified in the launch template.
- See:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html
- core_count
The number of CPU cores for the instance.
- Default:
The default number of CPU cores for the selected instance type.
- nested_virtualization
Indicates whether the instance is enabled for nested virtualization.
- Default:
Nested virtualization is not specified in the launch template.
- threads_per_core
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.
- Default:
The default number of threads per core for the selected instance type.