Normally you'd deploy an AWS API Gateway service which exposes a websocket for external use. And you have you service (Lambda, ECS etc) behind that API Gateway.
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-overview.html