Reputation: 530
First of all, I'm new to socket
programming and AWS beanstalk
.
AS per my initial investigation I have founded AWS Elastic Beanstalk(EB)
not support WebSocket
. So I need to do a workaround on EB
to enable that.
I have developed a java application with one WebSocket
request for notification. Its working fine in local machines when I deployed to AWS EB
the WebSocket
request-response 501 status code. I just investigate this issue I found we need to work around for enabling WebSocket
request in EB
. but I have no more idea how it does. I'm stuck in This situation. I Already have Load Balancer And security certificate.that are enabled on my EB
.
How can I enable WebSocket
request without fail existing conditions?
I found One solution But I have doubt Where it put the configuration file described in this link Solution
Upvotes: 1
Views: 1365
Reputation: 1349
I don't know about the java application you are running, but I know about how to setup your Elastic Load Balancer to work with websockets.
First of all, websockets doesn't work through CloudFront so you need to setup a separate domain (i.e. websockets.domain.com) that points directly to your load balancer, an A record alias.
Second, setup a new listener to your Elastic Load Balancer to use TCP and SSL. Generate a certificate through ACM.
Last, change your websocket client to use your new domain and port.
Upvotes: 1