Genesys Cloud Webhooks returning 503 after 3 retries — need to push to SQS DLQ

Docs state: “If your endpoint returns a 5xx status code, the webhook will be retried up to three times with exponential backoff.”

We’re hitting the wall on this. Our internal event consumer is flaky during peak load and keeps throwing 503s. Genesys gives up after the third attempt and the event is lost. We need to catch these failures and push them to an SQS dead letter queue for manual replay.

I’ve set up a Lambda function as a middleman. It receives the webhook, validates the signature, and forwards the payload to our backend. If the backend fails, the Lambda returns a 500.

def lambda_handler(event, context):
 try:
 response = backend.post(event['body'])
 if response.status_code >= 200 and response.status_code < 300:
 return { 'statusCode': 200 }
 except Exception as e:
 # Push to DLQ
 sqs.send_message(
 QueueUrl=DLQ_URL,
 MessageBody=json.dumps(event)
 )
 # Return 500 to trigger retry? Or 200 to stop?
 return { 'statusCode': 500 }

The problem is the logic. If I return 500, Genesys retries. But if the backend is down, we just spam the DLQ with duplicate events on every retry. If I return 200, Genesys stops retrying, but then I have to handle the DLQ push manually without the benefit of Genesys’s retry mechanism for transient errors.

Is there a way to tell Genesys “I got this, stop retrying, but here’s the error”? Or do I need to return a specific status code to break the retry loop while still logging the failure?

Current setup:

  • Webhook endpoint: HTTPS POST
  • Payload: JSON
  • Retry count: 3
  • Error: 503 Service Unavailable