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 réponse
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
INGÉNIEUR EN ASSISTANCE TECHNIQUE
Isha_K
répondu il y a un an
  • I found out that , the issue was in the server side , the connection url was wrong when used post response in the Lambda function

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions