'AWS API Gateway routes request to $default instead of route

I am using an AWS Websocket API Gateway that has the following routes:

enter image description here

I've been able to connect to my websocket and send requests and receive responses from /SendMessage with the following json: {"action": "SendMessage", "message": "Hello, World"} however, when I tried adding a new route /Register. Sending the json {"action": "Register", "message": "Hello, World"} AWS API Gateway routes the request to $default.

The following request appears on CloudWatch:

enter image description here

The request should be routed to /Register and not /default. Do I need to do some kind of redeployment of the API Gateway when I add a new route?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source