title: Setting up WebSockets with Django Channels on AWS Elastic Beanstalk
body: <p>I'm trying to set up WebSockets on AWS instance. Since I use Django for my webapp, for WebSocket support I use <a href="https://github.com/django/channels" rel="nofollow noreferrer">Django Channels</a>. I deployed the app using AWS Elastic Beanstalk, but I get the error: </p>
  
  <blockquote>
    <p>WebSocket connection to 'ws://xxx.elasticbeanstalk.com/' failed: Error
    during WebSocket handshake: Unexpected response code: 200.</p>
  </blockquote>
  
  <p>After some research I found that I need to set up TCP on port 80 and SSL on 443 instead of HTTP and HTTPS, which I did, but without change, I still get the error. I also disabled load balancing across multiple Availability Zones with no success.</p>
  
  <p>I don't know if the EB config file makes problem, since I have only <code>WSGIPath</code> set and not the ASGI which is used by Daphine and Channels. There is no <code>ASGIPath</code> tag to try this.</p>
  
  <p>I found an article about new <a href="https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/" rel="nofollow noreferrer">Application Load Balancer</a>, but since it is a quite new service, I wasn't able to find anything for WebSockets with Django. Django Channels is also new, so not many questions and posts about it as well.</p>