# ComputeConfiguration

The compute configuration for the fleet.

- Source: [`aws-codebuild/lib/fleet.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-codebuild/lib/fleet.ts#L135)
- Type last changed: v2.219.0 · 1 Oct 2025

## Example

```ts
import { Size } from 'aws-cdk-lib';

const fleet = new codebuild.Fleet(this, 'MyFleet', {
  baseCapacity: 1,
  computeType: codebuild.FleetComputeType.ATTRIBUTE_BASED,
  environmentType: codebuild.EnvironmentType.LINUX_CONTAINER,
  computeConfiguration: {
    vCpu: 2,
    memory: Size.gibibytes(4),
    disk: Size.gibibytes(10),
    machineType: codebuild.MachineType.GENERAL,
  },
});
```

## Properties

- `disk`: [Size](/cdk/api/v2/docs/aws-cdk-lib.Size.html) — When using ATTRIBUTE_BASED, the amount of disk space of the instance type included in your fleet.

  **Default:** No requirement, the actual value will be based on the other selected configuration properties

  When using CUSTOM_INSTANCE_TYPE,
  the additional amount of disk space to provision over the 64GB included by
  default.

- `instanceType`: [InstanceType](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InstanceType.html) = none — When using CUSTOM_INSTANCE_TYPE, the EC2 instance type to use for fleet instances.

  Not all instance types are supported by CodeBuild. If you use a disallowed type, the
  CloudFormation deployment will fail.

- `machineType`: [MachineType](/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.MachineType.html) — When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet.

  **Default:** No requirement, the actual value will be based on the other selected configuration properties

- `memory`: [Size](/cdk/api/v2/docs/aws-cdk-lib.Size.html) — When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet.

  **Default:** No requirement, the actual value will be based on the other selected configuration properties

- `vCpu`: number — When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet.

  **Default:** No requirement, the actual value will be based on the other selected configuration properties
