processAnalyticsBatch Lambda hits MaxConcurrencyExceeded and drops records when EventBridge pushes a burst of 12k conversation.media.created events during the 08:00 GMT+8 rush. Error log shows ERROR: Concurrency limit exceeded. We’re trying to aggregate talkTime metrics for the dashboard, yet the EventSourceMapping config seems to throttle too hard. Handler uses await Promise.all() on batch items to call /api/v2/analytics/conversations/queries, but response time spikes cause the batch to time out before the next window opens. Changing BatchSize to 100 didn’t help, just increased cold start lag. Current mapping setup:
{
"EventSourceMappingConfiguration": {
"MaximumConcurrency": 50,
"BisectBatchOnFunctionError": true,
"MaximumRetryAttempts": 3
}
}
Tuning MaximumConcurrency relative to the EventBridge ScheduleExpression without losing the wrapUpCode data feels tricky. Dashboard is already missing 45 minutes of talkTime metrics.