##Using Jupyter Notebook with AWS EC2 Thanks to http://blog.impiyush.me/2015/02/running-ipython-notebook-server-on-aws.html #Ensure your EC2 aws security settings are set appropriately: SSH TCP 22 Anywhere HTTPS TCP 443 Anywhere CustomTCPRule TCP 8888 Anywhere
#Create a sha1 key for ipython:
$ ipython
In [1]:from IPython.lib import passwd
In [2]:passwd()
the return will be an sha1 key. Note it for reuse.
$ jupyter notebook --generate-config
$ mkdir certs
$ cd certs
$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
$ cd ~/.jupyter/
$ vi jupyter_notebook_config.py
Edit the file:
c = get_config()
# Kernel config
c.IPKernelApp.pylab = 'inline' # if you want plotting support always in your notebook
# Notebook config
c.NotebookApp.certfile = u'/home/ubuntu/certs/mycert.pem' #location of your certificate file
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False #so that the ipython notebook does not opens up a browser by default
c.NotebookApp.password = u'sha1:68c136a5b064...' #the encrypted password we generated above
# It is a good idea to put it on a known, fixed port
c.NotebookApp.port = 8888
#Start the noteboook server
$ cd ~
$ mkdir Notebooks
$ cd Notebooks
$ jupyter notebook (or in the background: nohup jupyter notebook &)