IPython Notebook on AWS EC2

1. install Anaconda3 – it is much easier to install this Python distro straight away.

wget [link to the latest version of anaconda]
bash Anaconda-*.sh

2. generate password in IPython

from IPython.lib import passed
passwd()
''' type password here and save the generated code '''

3.generate notebook profile

ipython profile create nbserver

4.generate openssl cert

condo update openssl

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

5.edit ipython_notebook_config.py as follows.

# Configuration file for ipython-notebook.
c = get_config()
# Kernel config
c.IPKernelApp.pylab = 'inline'
# Notebook config
c.NotebookApp.certfile = u'/PATH_TO_CERT/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = [GENERATED_CODE]
c.NotebookApp.port = 8888

6. start IPython notebook server

ipython notebook --profile=nbserver

Visit https://ec2-IP.compute-1.amazonaws.com:8888 to use.