What does "batch size" exactly mean in case of AWS Lambda?

Viewed 350

I read about batch size of getting events from triggers into AWS Lambda, over here: link

If the batch size is set to a 10 (say), then does it mean that lambda will wait until there are 10 messages available to process or is it the upper limit - i.e. when fetching events to process, it'll fetch up to 10 at a time?

If 10 events are fetched to process, then how will they be provided as input to the lambda? Will they be provided as an array of 10 elements?

1 Answers

Batch size is an upper limit:

The number of items in the event can be smaller than the batch size if there aren't enough items available, or if the batch is too large to send in one event and has to be split up.

Yes, as an array. For example, format of such an event is shown for SQS.

Related