Lambda concurrency throttling on EventBridge WFM events

EventBridge is firing WFM adherence updates faster than my Lambda can handle. I’m hitting the concurrency limit and getting 429 errors. Is there a standard pattern for batching these events before they hit the handler?

Batching inside the Lambda handler is the wrong move here. You’re fighting the symptom, not the cause. EventBridge doesn’t support native batching for individual event rules, so you have to shift the load elsewhere. The standard pattern is to point the EventBridge rule at an SQS queue instead of the Lambda directly. Set the queue’s MaximumMessageBatchSize and BatchWindow to aggregate those adherence pings. Then, configure the Lambda to trigger off the SQS queue with a BatchSize that matches your concurrency limits. This smooths out the spike.

{
 "Type": "SQS",
 "Arn": "arn:aws:sqs:us-east-1:123456789012:WFM-Adherence-Queue",
 "FilterPolicy": {
 "source": ["genesyscloud"]
 }
}

Make sure the Lambda role has sqs:ReceiveMessage and sqs:DeleteMessage permissions. Don’t forget to enable server-side encryption on the queue if you’re handling PII. It handles the throttling gracefully without you rewriting the handler logic.