Ok…If you are still getting disconnected, it might be worthwhile to open up port 8888 on your AWS Server and directly connect to it via the Browser.
Configure Jupyter to accept connections from everywhere - $jupyter notebook --generate-config
- To create a password run
$jupyter notebook password
Then update the config via -
$echo "c.NotebookApp.ip = '*'" >> $HOME/.jupyter/jupyter_notebook_config.py
$echo "c.NotebookApp.open_browser = False" >> $HOME/.jupyter/jupyter_notebook_config.py
Then if the port 8888 is open and you run jupyter notebook
in your tmux session, you can access it from browser via the http://:8888 and you are no longer bound to your ssh connection. You can even remove the tunneling from your ssh connection.