API Gateway websockets - which function is client ping's routed to?

Viewed 387

In my application the client sends a ping to my api gateway websocket url. I have 4 functions linked to each route $connect, $disconnect, sendmessage, and $default.

The ping is currently working because the idle connection does not disconnect after 10 minutes and lasts up to two hours. However I cannot figure out which function the pings are sent to. They don't appear in any of my 4 listed above. Does anyone know which function the pings are routed to?

1 Answers

If you could route pings to a specific route, it would've probably been added to the documentation, which is not the case. And considering the $default handler also not invoked, I'd assume pings are treated differently than regular frames, which makes sense, since they are not regular frames, but Control Frames, as defined RFC 6455:

Control frames are used to communicate state about the WebSocket.

Related