0

According to the AWS documentation, "WebSockets and Secure WebSockets support is available natively and ready for use on an Application Load Balancer."

However, when I select Application Load Balancer in EC2, I don't have any option other than HTTP and HTTPS:

Protocol options

I would like to use the secure websocket protocol (wss://) which I believe would be over TLS:8888.

How can I input this option?

Tyler
  • 11,272
  • 9
  • 65
  • 105
  • 1
    Have a look at this [question](https://stackoverflow.com/questions/39336033/does-an-application-load-balancer-support-websockets). You have to use http or https for that. – Marcin Nov 18 '20 at 22:49

2 Answers2

1

The solution was to use HTTPS for the listener protocol, even though the browser is making requests to wss://.

For port number, configuring both the listener and environment instance to port 8888 works.

Tyler
  • 11,272
  • 9
  • 65
  • 105
0

Create a new Target Group with your port that websocket uses. Point that target group to the same EC2 instance.

Then create a new listener with websocket port and point the newly created Target Group.

This should work fine.

NinjaMAN
  • 101
  • 7