Show / Hide Table of Contents

Enum CpuManufacturer

CPU manufacturers supported by EC2 instances.

Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum CpuManufacturer
Syntax (vb)
Public Enum CpuManufacturer
Remarks

Restricts the acceptable CPU vendor for selected instance types.

ExampleMetadata: infused

Examples
Vpc vpc;
             Role infrastructureRole;
             InstanceProfile instanceProfile;


             var cluster = new Cluster(this, "Cluster", new ClusterProps { Vpc = vpc });

             // Create a Managed Instances Capacity Provider
             var miCapacityProvider = new ManagedInstancesCapacityProvider(this, "MICapacityProvider", new ManagedInstancesCapacityProviderProps {
                 InfrastructureRole = infrastructureRole,
                 Ec2InstanceProfile = instanceProfile,
                 Subnets = vpc.PrivateSubnets,
                 SecurityGroups = new [] { new SecurityGroup(this, "MISecurityGroup", new SecurityGroupProps { Vpc = vpc }) },
                 InstanceRequirements = new InstanceRequirementsConfig {
                     VCpuCountMin = 1,
                     MemoryMin = Size.Gibibytes(2),
                     CpuManufacturers = new [] { CpuManufacturer.INTEL },
                     AcceleratorManufacturers = new [] { AcceleratorManufacturer.NVIDIA }
                 },
                 PropagateTags = PropagateManagedInstancesTags.CAPACITY_PROVIDER
             });

             // Add the capacity provider to the cluster
             cluster.AddManagedInstancesCapacityProvider(miCapacityProvider);

             var taskDefinition = new Ec2TaskDefinition(this, "TaskDef");

             taskDefinition.AddContainer("web", new ContainerDefinitionOptions {
                 Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample"),
                 MemoryReservationMiB = 256
             });

             new Ec2Service(this, "EC2Service", new Ec2ServiceProps {
                 Cluster = cluster,
                 TaskDefinition = taskDefinition,
                 MinHealthyPercent = 100,
                 CapacityProviderStrategies = new [] { new CapacityProviderStrategy {
                     CapacityProvider = miCapacityProvider.CapacityProviderName,
                     Weight = 1
                 } }
             });

Synopsis

Fields

AMD

AMD CPUs (e.g., EPYC families).

APPLE

Apple CPUs (e.g., M1, M2).

AWS

AWS-designed CPUs (e.g., Graviton families).

INTEL

Intel CPUs (e.g., Xeon families).

Fields

Name Description
AMD

AMD CPUs (e.g., EPYC families).

APPLE

Apple CPUs (e.g., M1, M2).

AWS

AWS-designed CPUs (e.g., Graviton families).

INTEL

Intel CPUs (e.g., Xeon families).

Back to top Generated by DocFX