Hey folks,
We’re trying to process high-volume interaction events from Genesys Cloud via EventBridge, but our Lambda is hitting the concurrency limit constantly. The trigger is set up for routing.interaction.update events, and during peak hours, we’re seeing a spike that overwhelms the default 1000 concurrent executions.
I’ve got a simple Python handler that just logs the event and pushes it to a DynamoDB table for later processing, but it’s timing out before it can finish. Here’s the basic structure:
def lambda_handler(event, context):
for record in event['Records']:
body = json.loads(record['body'])
# Process interaction data
db.put_item(Item=body)
return {'statusCode': 200}
The issue is that EventBridge sends these events in batches, and if the Lambda times out, those events get retried, causing an even bigger spike. I’ve tried increasing the batch size to 100, but that just makes the timeout worse.
How are you guys handling this? Should I be using SQS as a buffer between EventBridge and Lambda, or is there a way to tune the EventBridge trigger settings to slow down the ingestion? Any code examples for the SQS approach would be great.
Thanks!