StreamEventSourceProps

class aws_cdk.aws_lambda_event_sources.StreamEventSourceProps(*, starting_position, batch_size=None, max_batching_window=None)

Bases: object

__init__(*, starting_position, batch_size=None, max_batching_window=None)

The set of properties for event sources that follow the streaming model, such as, Dynamo and Kinesis.

Parameters
  • starting_position (StartingPosition) – Where to begin consuming the stream.

  • batch_size (Union[int, float, None]) – 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 {@link DynamoEventSource} - 10000 for {@link KinesisEventSource} Default: 100

  • max_batching_window (Optional[Duration]) – The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5). Default: Duration.seconds(0)

Attributes

batch_size

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 {@link DynamoEventSource}

    • 10000 for {@link KinesisEventSource}

default :default: 100

Return type

Union[int, float, None]

max_batching_window

The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5).

default :default: Duration.seconds(0)

Return type

Optional[Duration]

starting_position

Where to begin consuming the stream.

Return type

StartingPosition