# MaxCapacity

The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.

A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory.

- Source: [`aws-glue/lib/constants.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-glue/lib/constants.ts#L302)
- Type last changed: v2.270.0 · 17 Sep 2026

## Example

```ts
import * as cdk from 'aws-cdk-lib';
import * as iam from 'aws-cdk-lib/aws-iam';
declare const stack: cdk.Stack;
declare const role: iam.IRole;
declare const script: glue.Code;
declare const extraPythonFile: glue.Code;
new glue.PythonShellJob(stack, 'PythonShellJob', {
  jobName: 'PythonShellJobCustomName',
  description: 'This is a description',
  pythonVersion: glue.PythonVersion.THREE_NINE,
  maxCapacity: glue.MaxCapacity.DPU_1,
  role,
  script,
  extraPythonFiles: [extraPythonFile],
  glueVersion: glue.GlueVersion.V3_0,
  continuousLogging: { enabled: false },
  maxConcurrentRuns: 100,
  timeout: cdk.Duration.hours(2),
  connections: [glue.Connection.fromConnectionName(stack, 'Connection', 'connectionName')],
  securityConfiguration: glue.SecurityConfiguration.fromSecurityConfigurationName(stack, 'SecurityConfig', 'securityConfigName'),
  tags: {
    FirstTagName: 'FirstTagValue',
    SecondTagName: 'SecondTagValue',
    XTagName: 'XTagValue',
  },
  maxRetries: 2,
});
```

## Members

| Member | Description |
| --- | --- |
| `DPU_1_16TH` | DPU value of 1/16th. |
| `DPU_1` | DPU value of 1. |

## Referenced by

- [`PythonShellJobProps`](/v2/docs/aws-cdk-lib.aws_glue.PythonShellJobProps).maxCapacity
