Amazon Websocket API Gateway fails to connect with error Unexpected server response: 500

1.9k views Asked by At

I have a Websocket API Gateway with a HTTP backend (via vpclink and no proxying) with three routes: default, connect and disconnect.

When I try to connect using wscat it fails with: Unexpected server response: 500

The backend service returns 200 so it is the gateway that returns 500.

Looking in CloudWatch I see the following error message:

Execution failed due to configuration error: No match for output mapping and no default output mapping configured. Endpoint Response Status Code: 200

What is the reason for this error? Does this mean I have to add an integration response? I thought this was optional.

1

There are 1 answers

0
Anton Putra On

For $connect route, add integration, for example, HTTP that would return a response with status code 200. Then add Integration Response with the following Response Key pattern /2\d\d/ or $default