Show / Hide Table of Contents

Enum BareMetal

Bare metal support requirements for EC2 instances.

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

Controls whether selected instance types must, may, or must not be bare metal variants (i.e., instances that run directly on physical hardware without a hypervisor).

ExampleMetadata: infused

Examples
Role infrastructureRole;
             InstanceProfile instanceProfile;
             Vpc vpc;


             var miCapacityProvider = new ManagedInstancesCapacityProvider(this, "MICapacityProvider", new ManagedInstancesCapacityProviderProps {
                 InfrastructureRole = infrastructureRole,
                 Ec2InstanceProfile = instanceProfile,
                 Subnets = vpc.PrivateSubnets,
                 InstanceRequirements = new InstanceRequirementsConfig {
                     // Required: CPU and memory constraints
                     VCpuCountMin = 2,
                     VCpuCountMax = 8,
                     MemoryMin = Size.Gibibytes(4),
                     MemoryMax = Size.Gibibytes(32),

                     // CPU preferences
                     CpuManufacturers = new [] { CpuManufacturer.INTEL, CpuManufacturer.AMD },
                     InstanceGenerations = new [] { InstanceGeneration.CURRENT },

                     // Instance type filtering
                     AllowedInstanceTypes = new [] { "m5.*", "c5.*" },

                     // Performance characteristics
                     BurstablePerformance = BurstablePerformance.EXCLUDED,
                     BareMetal = BareMetal.EXCLUDED,

                     // Accelerator requirements (for ML/AI workloads)
                     AcceleratorTypes = new [] { AcceleratorType.GPU },
                     AcceleratorManufacturers = new [] { AcceleratorManufacturer.NVIDIA },
                     AcceleratorNames = new [] { AcceleratorName.T4, AcceleratorName.V100 },
                     AcceleratorCountMin = 1,

                     // Storage requirements
                     LocalStorage = LocalStorage.REQUIRED,
                     LocalStorageTypes = new [] { LocalStorageType.SSD },
                     TotalLocalStorageGBMin = 100,

                     // Network requirements
                     NetworkInterfaceCountMin = 2,
                     NetworkBandwidthGbpsMin = 10,

                     // Cost optimization
                     OnDemandMaxPricePercentageOverLowestPrice = 10
                 }
             });

Synopsis

Fields

EXCLUDED

Bare metal instance types are disallowed.

INCLUDED

Bare metal instance types are allowed, but non-bare-metal (virtualized) types may also be selected.

REQUIRED

Only bare metal instance types are allowed.

Fields

Name Description
EXCLUDED

Bare metal instance types are disallowed.

INCLUDED

Bare metal instance types are allowed, but non-bare-metal (virtualized) types may also be selected.

REQUIRED

Only bare metal instance types are allowed.

Back to top Generated by DocFX