# ProvisionedPollerConfig

(Amazon MSK and self-managed Apache Kafka only) The provisioned mode configuration for the event source.

- Source: [`aws-lambda-event-sources/lib/stream.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-lambda-event-sources/lib/stream.ts#L65)
- Type last changed: v2.254.0 · 13 May 2026

## Example

```ts
import { ManagedKafkaEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';

// Your MSK cluster arn
const clusterArn = 'arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4';

declare const myFunction: lambda.Function;

// Enable basic event and error metrics
myFunction.addEventSource(new ManagedKafkaEventSource({
  clusterArn,
  topic: 'basic-monitoring',
  startingPosition: lambda.StartingPosition.LATEST,
  // Provisioned mode is required for observability features
  provisionedPollerConfig: {
    minimumPollers: 2,
    maximumPollers: 10,
  },
  metricsConfig: {
    metrics: [
      lambda.MetricType.EVENT_COUNT,
      lambda.MetricType.ERROR_COUNT
    ]
  }
}));
```

## Properties

- `maximumPollers`: number = 200 — The maximum number of pollers that can be provisioned.

  Valid Range: Minimum value of 1. Maximum value of 2000.

- `minimumPollers`: number = 1 — The minimum number of pollers that should be provisioned.

  Valid Range: Minimum value of 1. Maximum value of 200.

- `pollerGroupName`: string — An optional identifier that groups multiple ESMs to share EPU capacity and reduce costs.

  **Default:** not set, dedicated compute resource per event source.

  ESMs with the same PollerGroupName share compute
  resources.
