If a AWS Lambda function has event sources from multiple Kinesis streams, will the batch of incoming records be from a single Kinesis stream or a mix?


The title might be a bit confusing. I’ll try my best to make it clearer.

Suppose I have a AWS Lambda function that has two different Kinesis streams A and B as input event sources.

So, for the below, since a KinesisEvent instance contains a batch of records, will the batch contain records from a single stream, or essentially it contain records from both streams A and B?


Each mapping between an AWS Kinesis stream and an AWS Lambda function is a dedicated entity resulting from a call to CreateEventSourceMapping and comprised of the EventSourceArn and the FunctionName, for which you also specify a dedicated Batch Size accordingly:

Consequently, the batches you will receive are constrained to the single event source that constitutes the resp. mapping, and each other event source will yield a separate invocation of your Lambda function accordingly, so everything is properly isolated.

Leave a Reply