# 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).

- Source: [`aws-ec2/lib/instance-requirements.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ec2/lib/instance-requirements.ts#L11)
- Type last changed: v2.236.0 · 23 Jan 2026

## Example

```ts
declare const vpc: ec2.Vpc;

const securityGroup = new ec2.SecurityGroup(this, 'SecurityGroup', {
  vpc,
  description: 'Security group for managed instances',
});

const miCapacityProvider = new ecs.ManagedInstancesCapacityProvider(this, 'MICapacityProvider', {
  subnets: vpc.privateSubnets,
  securityGroups: [securityGroup],
  instanceRequirements: {
    // Required: CPU and memory constraints
    vCpuCountMin: 2,
    vCpuCountMax: 8,
    memoryMin: Size.gibibytes(4),
    memoryMax: Size.gibibytes(32),

    // CPU preferences
    cpuManufacturers: [ec2.CpuManufacturer.INTEL, ec2.CpuManufacturer.AMD],
    instanceGenerations: [ec2.InstanceGeneration.CURRENT],

    // Instance type filtering
    allowedInstanceTypes: ['m5.*', 'c5.*'],

    // Performance characteristics
    burstablePerformance: ec2.BurstablePerformance.EXCLUDED,
    bareMetal: ec2.BareMetal.EXCLUDED,

    // Accelerator requirements (for ML/AI workloads)
    acceleratorTypes: [ec2.AcceleratorType.GPU],
    acceleratorManufacturers: [ec2.AcceleratorManufacturer.NVIDIA],
    acceleratorNames: [ec2.AcceleratorName.T4, ec2.AcceleratorName.V100],
    acceleratorCountMin: 1,

    // Storage requirements
    localStorage: ec2.LocalStorage.REQUIRED,
    localStorageTypes: [ec2.LocalStorageType.SSD],
    totalLocalStorageGBMin: 100,

    // Network requirements
    networkInterfaceCountMin: 2,
    networkBandwidthGbpsMin: 10,

    // Cost optimization
    onDemandMaxPricePercentageOverLowestPrice: 10,
  },
});
```

## Members

| Member | Description |
| --- | --- |
| `GPU` | Graphics Processing Unit accelerators, such as NVIDIA GPUs. |
| `FPGA` | Field Programmable Gate Array accelerators, such as Xilinx FPGAs. |
| `INFERENCE` | Inference accelerators, such as AWS Inferentia. |
| `MEDIA` | Media accelerators for video transcoding and processing workloads. |

## Referenced by

- [`InstanceRequirementsConfig`](/v2/docs/aws-cdk-lib.aws_ec2.InstanceRequirementsConfig).acceleratorTypes
