Enum AcceleratorType

java.lang.Object
java.lang.Enum<AcceleratorType>
software.amazon.awscdk.services.ec2.AcceleratorType
All Implemented Interfaces:
Serializable, Comparable<AcceleratorType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:42.333Z") @Stability(Stable) public enum AcceleratorType extends Enum<AcceleratorType>
Hardware accelerator categories available for EC2 instances.

Defines the general type of hardware accelerator that can be attached to an instance, typically used in instance requirement specifications (e.g., GPUs for compute-intensive tasks, FPGAs for custom logic, or inference chips for ML workloads).

Example:

 Vpc vpc;
 SecurityGroup securityGroup = SecurityGroup.Builder.create(this, "SecurityGroup")
         .vpc(vpc)
         .description("Security group for managed instances")
         .build();
 ManagedInstancesCapacityProvider miCapacityProvider = ManagedInstancesCapacityProvider.Builder.create(this, "MICapacityProvider")
         .subnets(vpc.getPrivateSubnets())
         .securityGroups(List.of(securityGroup))
         .instanceRequirements(InstanceRequirementsConfig.builder()
                 // Required: CPU and memory constraints
                 .vCpuCountMin(2)
                 .vCpuCountMax(8)
                 .memoryMin(Size.gibibytes(4))
                 .memoryMax(Size.gibibytes(32))
                 // CPU preferences
                 .cpuManufacturers(List.of(CpuManufacturer.INTEL, CpuManufacturer.AMD))
                 .instanceGenerations(List.of(InstanceGeneration.CURRENT))
                 // Instance type filtering
                 .allowedInstanceTypes(List.of("m5.*", "c5.*"))
                 // Performance characteristics
                 .burstablePerformance(BurstablePerformance.EXCLUDED)
                 .bareMetal(BareMetal.EXCLUDED)
                 // Accelerator requirements (for ML/AI workloads)
                 .acceleratorTypes(List.of(AcceleratorType.GPU))
                 .acceleratorManufacturers(List.of(AcceleratorManufacturer.NVIDIA))
                 .acceleratorNames(List.of(AcceleratorName.T4, AcceleratorName.V100))
                 .acceleratorCountMin(1)
                 // Storage requirements
                 .localStorage(LocalStorage.REQUIRED)
                 .localStorageTypes(List.of(LocalStorageType.SSD))
                 .totalLocalStorageGBMin(100)
                 // Network requirements
                 .networkInterfaceCountMin(2)
                 .networkBandwidthGbpsMin(10)
                 // Cost optimization
                 .onDemandMaxPricePercentageOverLowestPrice(10)
                 .build())
         .build();
 
  • Enum Constant Details

    • GPU

      @Stability(Stable) public static final AcceleratorType GPU
      Graphics Processing Unit accelerators, such as NVIDIA GPUs.

      Commonly used for machine learning training, graphics rendering, or high-performance parallel computing.

    • FPGA

      @Stability(Stable) public static final AcceleratorType FPGA
      Field Programmable Gate Array accelerators, such as Xilinx FPGAs.

      Used for hardware-level customization and specialized workloads.

    • INFERENCE

      @Stability(Stable) public static final AcceleratorType INFERENCE
      Inference accelerators, such as AWS Inferentia.

      Purpose-built for efficient machine learning inference.

    • MEDIA

      @Stability(Stable) public static final AcceleratorType MEDIA
      Media accelerators for video transcoding and processing workloads.
  • Method Details

    • values

      public static AcceleratorType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AcceleratorType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null