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 Risposta
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
TECNICO DI SUPPORTO
Isha_K
con risposta un anno fa
  • I found out that , the issue was in the server side , the connection url was wrong when used post response in the Lambda function

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande