I’m trying to set up an EventBridge rule in Genesys Cloud to push real-time adherence alerts to our AWS queue. The goal is to trigger a lambda when an agent goes off-schedule.
I’m using the POST /api/v2/analytics/wem/eventbridgerules endpoint. The request body looks like this:
{
"name": "WEM Off-Schedule Alert",
"enabled": true,
"eventBridgeTargets": [
{
"arn": "arn:aws:events:us-west-2:123456789012:event-bus/main",
"roleArn": "arn:aws:iam::123456789012:role/GenesysEventBridgeRole"
}
],
"events": ["agent.session.offSchedule"]
}
The API returns a 400 Bad Request. The error message says Invalid target ARN format. I’ve checked the AWS console and the ARN is definitely correct. The IAM role has the events:PutEvents permission attached.
Is there a specific format Genesys expects for the ARN? Or do I need to configure the EventBridge bus differently on the AWS side first? I’m using the Python SDK for the call, so I’m passing this JSON as the body.
Any help would be appreciated. I’ve been staring at this for an hour.