Hello all!
I am trying to deploy my new websocket api gateway. Following the documentation here, I have created a little hello world app.
However, when I try to deploy, I get the following error:
Serverless Error ---------------------------------------
You need to set the “route” when using the websocket event.
If I change my functions to use the “route” param instead of “routeKey”, then I get this error:
Serverless Error ---------------------------------------
Missing required key ‘RouteKey’ in params
if I try a combination of the two, I can get deploy successfully, but the websocket does not register any connection attempt.
Has anyone seen this before?
Here is my serverless yaml for reference:
functions:
connectionManagement:
handler: connectionHandler.connectionHandler
events:
- websocket:
routeKey: $connect
- websocket:
routeKey: $disconnect
defaultMessage:
handler: connectionHandler.defaultHandler
events:
- websocket:
routeKey: $default
chatMessage:
handler: messageHandler.sendMessage
events:
- websocket:
routeKey: message