What happens if a dynamodb stream lambda times out?

Lets say I do a couple batch inserts in quick succession into a dynamodb table with max amount i.e. 25 items each time.

Now lets say I have a lambda reading the dynamodb stream…

Not sure what the max amount of record ‘insert events’ the lambda can receive in any one invocation (does anyone know ?), but lets say it gets 25…

For each of these 25 records I then need to put a message on an SNS topic (which has idempotent subscriber(s))

What happens if the lambda processing those stream events times out before all 25 messages were put on the SNS topic ? I guess the lambda will get triggered again with the same 25 insert events which most likely would cause the exact same issue (or close enough) again…causing some messages to never get put on the SNS topic

any ideas what to do in a situation like this ?