interface ProvisionedPollerConfig
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Lambda.EventSources.ProvisionedPollerConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambdaeventsources#ProvisionedPollerConfig |
Java | software.amazon.awscdk.services.lambda.eventsources.ProvisionedPollerConfig |
Python | aws_cdk.aws_lambda_event_sources.ProvisionedPollerConfig |
TypeScript (source) | aws-cdk-lib » aws_lambda_event_sources » ProvisionedPollerConfig |
(Amazon MSK and self-managed Apache Kafka only) The provisioned mode configuration for the event source.
Example
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
| Name | Type | Description |
|---|---|---|
| maximum | number | The maximum number of pollers that can be provisioned. |
| minimum | number | The minimum number of pollers that should be provisioned. |
| poller | string | An optional identifier that groups multiple ESMs to share EPU capacity and reduce costs. |
maximumPollers
Type:
number
The maximum number of pollers that can be provisioned.
minimumPollers
Type:
number
The minimum number of pollers that should be provisioned.
pollerGroupName?
Type:
string
(optional, default: not set, dedicated compute resource per event source.)
An optional identifier that groups multiple ESMs to share EPU capacity and reduce costs.
ESMs with the same PollerGroupName share compute resources.

.NET
Go
Java
Python
TypeScript (