We’re seeing a massive volume of conversation.end events flooding our EventBridge bus, even though we only care about calls ending in our specific sales queue. I’ve tried adding a filter policy to the EventBridge rule to match the queueId inside the event detail, but the events still pass through unfiltered. The JSON payload structure is nested deep, and it seems like the filter policy isn’t parsing the resources array correctly. Here’s the policy I’m testing:
{
"detail-type": ["Conversation Event"],
"detail": {
"eventType": ["conversation.end"],
"resources": [{"id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"}]
}
}
The issue is that resources is an array of objects, and I don’t know if the EventBridge filter supports JSON array indexing or exists checks in this context. We’ve tried using exists but it just ignores the filter entirely. Is there a way to drill down into the array to match the specific queue ID, or do we have to handle this filtering in the Lambda consumer instead?