I've configured a WebSocket API with API Gateway and am trying to get a custom domain name configured for it. It's a very simple API that sends messages between connected clients, which stores connection IDs in DynamoDB. In essence, it is similar to the example demonstrated here: https://aws.amazon.com/blogs/compute/announcing-websocket-apis-in-amazon-api-gateway/
All works fine when using the AWS-generated URL i.e. wss://.execute-api.us-west-2.amazonaws.com/. However, when I follow these instructions from AWS to set up a custom regional domain name, I am able to connect but am unable to send messages between clients.
I've checked the Cloudwatch logs for my Lambda functions and don't see any errors and have tried launching an entirely new environment using my CloudFormation template to no avail.
To be very clear, the following connection command triggers my Lambda function correctly and connects my client using the AWS-generated URL AND my own in Route 53.
wscat -c wss://<endpoint> <payload>
The following command, which sends a message to connected clients, works using the AWS-generated URL but NOT my own.
{ "message": "sendMessage", "toId": "193818", "data", "a random msg" }