We are seeing duplicate events in AWS EventBridge when applying changes to our Genesys Cloud infrastructure via Terraform. The genesyscloud_eventbridge_integration resource triggers an update, and subsequently, we receive two identical conversation:wrap-up events for a single interaction. The event payload includes a traceId field, but it appears to be the same for both events. We need a programmatic way to deduplicate these events in our consumer Lambda function or prevent the duplication at the source. Here is the Terraform configuration we are using:
resource "genesyscloud_eventbridge_integration" "cx_events" {
name = "CX EventBridge Integration"
enabled = true
description = "Sends CX events to EventBridge"
event_sources {
name = "all"
enabled = true
}
}
The Lambda function currently processes every event it receives. We are attempting to implement a deduplication strategy using an Amazon DynamoDB table with the traceId as the partition key. However, this approach is failing under high load due to conditional write failures. We have also considered using the id field from the event payload, but it is not unique enough. We are looking for a reliable method to ensure that each Genesys Cloud event is processed only once. The current setup is causing significant issues with our downstream analytics. We have tried adjusting the retry policies in EventBridge, but that does not address the root cause. The duplication seems to be tied to the Terraform apply process. We are using the latest version of the Genesys Cloud Terraform provider. We need a solution that is scalable and does not introduce significant latency. We are also open to suggestions on how to configure the EventBridge integration to prevent duplicate events at the source. We have checked the Genesys Cloud documentation, but there is limited information on this specific issue. We are currently running in the Europe/Berlin timezone. Any insights would be appreciated.