I’ve got an EventBridge rule set up to catch conversation.end events, but it’s firing for every single queue in the org. That’s a lot of noise. I only care about queue_12345. The docs show the event payload structure, but I can’t figure out the exact JSON path for the filter in the rule.
Here’s what I’m trying:
{
"detail": {
"queueId": ["queue_12345"]
}
}
It doesn’t work. The rule matches nothing. I checked the raw event in the console. The queueId is nested under Data. So I tried this:
{
"detail": {
"Data": {
"queueId": ["queue_12345"]
}
}
}
Still nothing. I even tried Data.queueId as a string path. Same result. I’m using the genesys.cloud source. Is there a specific field I’m missing? Or is the structure different for conversation.end?
I’m using Terraform to deploy the rule. Here’s the snippet:
terraform {
provider "aws" {
region = "eu-central-1"
}
}
resource "aws_cloudwatch_event_rule" "genesys_conv_end" {
name = "genesys-conv-end-queue"
description = "Filter conversation.end for specific queue"
event_pattern = jsonencode({
source = ["genesys.cloud"]
detail-type = ["Conversation Event"]
detail = {
type = ["conversation.end"]
Data = {
queueId = ["queue_12345"]
}
}
})
}
The rule creates fine, but no events hit the target Lambda. I can see the events in the Genesys console. They have the queue ID. I’m sure of it. What am I doing wrong with the filter? It feels like the docs are outdated. Or maybe I’m blind. I’ve been staring at this for two hours. The timezone is Berlin, so I’m up late trying to fix this. Any help would be appreciated. I just want the Lambda to trigger for that one queue. Not all of them. It’s messy.