How does lambda function know when new records are pushed to Kinesis?

37 Views Asked by At

I lambda function is configured to consume records from Kinesis stream.

How does the lambda know when new records are pushed?

  1. does it poll the Kinesis stream periodically?
  2. is there some trigger that will fire only when new records are added?
1

There are 1 best solutions below

0
Mark B On

Per the official documentation on using AWS Lambda with Kinesis:

For standard iterators, Lambda polls each shard in your Kinesis stream for records using HTTP protocol. The event source mapping shares read throughput with other consumers of the shard.

To minimize latency and maximize read throughput, you can create a data stream consumer with enhanced fan-out. Stream consumers get a dedicated connection to each shard that doesn't impact other applications reading from the stream.