title: Unable to connect jupyter notebook on AWS
body: <p>I have trouble connecting jupyter notebook on AWS. I tried several solutions on SO, including setting security group rule with port 8888 from any ip, setting configure file like:</p>
  
  <pre><code>c = get_config()
  
  # Notebook config this is where you saved your pem cert
  c.NotebookApp.certfile = u'/home/ubuntu/certs/mycert.pem' 
  # Run on all IP addresses of your instance
  c.NotebookApp.ip = '*'
  # Don't open browser by default
  c.NotebookApp.open_browser = False  
  # Fix port to 8888
  c.NotebookApp.port = 8888
  </code></pre>
  
  <p>Also, I tried using <code>jupyter notebook --ip=my_aws_ip --port=8888</code>. For the login part, I use <code>ssh -i &lt;pem key&gt; ubuntu@&lt;ec2...&gt; -L 8888:localhost:8888</code> All above solutions returned <code>https://ip-172-31-44-200:8888/?token=******</code>, and I was not able to open this url in the web browser, saying that <code>ip-172-31-44-200’s server IP address could not be found.</code>. </p>
  
  <p>Is there any solution? Thanks in advance!</p>