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, KafkaDlq } 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';
// The Kafka topic you want to subscribe to
const topic = 'some-cool-topic';
declare const myFunction: lambda.Function;
// Create a Kafka DLQ destination
const kafkaDlq = new KafkaDlq('failure-topic');
myFunction.addEventSource(new ManagedKafkaEventSource({
clusterArn,
topic,
startingPosition: lambda.StartingPosition.TRIM_HORIZON,
onFailure: kafkaDlq,
provisionedPollerConfig: {
minimumPollers: 1,
maximumPollers: 1,
},
}));
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 (