2 Answers
- Newest
- Most votes
- Most comments
0
Although I can't find any document stating that the batchSize will always be 1 I think it will be.
Nevertheless usually when I implemented these lambda's I used one of the following patterns:
- just create a loop over the records. just in case it changes in future...
- refuse events that have > 1 record count, generate an error -> cloudwatch logs -> alarm
answered 2 years ago
0
Only Event source mapping (SQS, Kinesis, MQ, DDB Streams) invocation allow for batching. All other invocation, synchronous (e.g., API Gateway) or asynchronous (e.g., S3, even though there is an internal queue), deliver the events to Lambda with a single event at a time.
If you want to handle S3 events in a batch you can use S3 -> SQS -> Lambda.
Relevant content
- asked 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago