Genesys Cloud EventBridge duplicate events causing logic loops

We’ve got an EventBridge integration pushing agent status changes to an SQS queue. The issue is that a single agent.state change is triggering two identical events within milliseconds. My consumer Lambda is processing both, which is messing up our custom queue analytics dashboard. I tried using the EventId field for deduplication in the code below, but it seems Genesys reuses the ID or the race condition happens before the check completes.

def lambda_handler(event, context):
 processed_ids = []
 for record in event['Records']:
 event_id = record['body']['EventId']
 if event_id in processed_ids:
 print(f"Skipping duplicate: {event_id}")
 continue
 # process event
 processed_ids.append(event_id)

Is there a standard way to handle this in the Genesys payload, or should I implement a sliding window check against DynamoDB? The documentation isn’t clear on event ordering guarantees.