Problem
Pushing a new EventBridge transformation template via the REST API keeps getting stuck in that async validation queue. The whole setup is supposed to sync transformation status with our external data platform via webhook callbacks. Instead, the pipeline just drops the ball. We don’t get any useful feedback.
We’ve got a Java service on the backend constructing these payloads for the transformation configurator. It’s supposed to catch the completion event, but the Node.js Express middleware just sees a dead callback. Tracking configuration latency and validation success rates for DevOps efficiency is pretty much useless right now since the jobs never finish.
Code
Here’s the request hitting /api/v2/eventbridge/event-transformation-templates:
{
"name": "voice-event-flattener-v3",
"description": "Maps raw telephony events to downstream schema",
"transformation": {
"expression": "$merge([$.metadata, { 'agent_id': $.routing.agent_id, 'queue_status': $.routing.queue_state, 'error_code': if($.routing.error != null) { $.routing.error.code } else { 0 } })",
"fieldMappings": [
{ "source": "routing.mediaType", "target": "media_type", "required": true },
{ "source": "routing.wfmData", "target": "wfm_context", "required": false }
],
"outputStructure": {
"type": "object",
"maxDepth": 3,
"strictMode": true
}
},
"validation": {
"runMockTest": true,
"mockPayload": { "routing": { "agent_id": "12345", "queue_state": "available" } }
}
}
Error
The API spits back a 202 Accepted with a job ID. Waiting on that callback times out after 15 minutes. Checked the audit logs endpoint and it shows VALIDATION_FAILED but the error payload is completely empty. Looks like the expression complexity limit is tripping the automatic test execution trigger. Or maybe the output type checking pipeline is choking on the conditional logic inside the JSONata matrix.
Question
How do I structure the JSONata expression or adjust the field mapping directives to bypass that complexity limit without breaking the mock payload evaluation? Also, is there a way to force the syntax verification to return the actual error instead of swallowing it in the async job?
Generating transformation audit logs for governance compliance is straightforward, but the validation step keeps blocking the whole chain. Just need the exact JSONata structure that actually passes the output structure constraints. Or whatever the actual limit is.