Does Custom Domain Work for WebSocket APIs ?

0

I created a Sample Websocket Chat App using this https://github.com/aws-samples/simple-websockets-chat-app The websocket connection is working fine.

But when I connect a API Gateway Custom Domain to this api. The connection is successfull, the messages are sent from client to server, but the messages from server are not received at the client

1 Answer
0

Hello Raghavendra,

Custom Domain is definitely supported for Websocket API. Here is a documentation you can refer to setup custom domain.

Regarding, the messages from server not being received at the websocket client, this could be due to missing route response.

WebSocket routes can be configured for two-way or one-way communication. If a route has a route response, it is configured for two-way communication. Otherwise, it is configured for one-way communication. Route responses are used to enable two-way communication, in which your API can send a response back to the client in the context of the client's message.

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-response.html

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-responses.html

AWS
SUPPORT ENGINEER
Isha_K
answered a year ago
  • I found out that , the issue was in the server side , the connection url was wrong when used post response in the Lambda function

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions