# BaseStreamEventSourceProps

The set of properties for streaming event sources shared by Dynamo, Kinesis and Kafka.

- Source: [`aws-lambda-event-sources/lib/stream.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-lambda-event-sources/lib/stream.ts#L12)
- Type last changed: v2.170.0 · 22 Nov 2024

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';
import { aws_lambda_event_sources as lambda_event_sources } from 'aws-cdk-lib';
const baseStreamEventSourceProps: lambda_event_sources.BaseStreamEventSourceProps = {
  startingPosition: lambda.StartingPosition.TRIM_HORIZON,

  // the properties below are optional
  batchSize: 123,
  enabled: false,
  maxBatchingWindow: cdk.Duration.minutes(30),
  provisionedPollerConfig: {
    maximumPollers: 123,
    minimumPollers: 123,
    pollerGroupName: 'pollerGroupName',
  },
};
```

## Properties

- `batchSize`: number = 100 — The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.

  Your function receives an
  event with all the retrieved records.

  Valid Range:
  * Minimum value of 1
  * Maximum value of:
    * 1000 for `DynamoEventSource`
    * 10000 for `KinesisEventSource`, `ManagedKafkaEventSource` and `SelfManagedKafkaEventSource`

- `enabled`: boolean = true — If the stream event source mapping should be enabled.

- `maxBatchingWindow`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The maximum amount of time to gather records before invoking the function.

  **Default:** Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.

  Maximum of Duration.minutes(5).

- `provisionedPollerConfig`: [ProvisionedPollerConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_event_sources.ProvisionedPollerConfig.html) — Configuration for provisioned pollers that read from the event source.

  **Default:** no provisioned pollers

  When specified, allows control over the minimum and maximum number of pollers
  that can be provisioned to process events from the source.

- `startingPosition`: [StartingPosition](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.StartingPosition.html) (required) — Where to begin consuming the stream.
