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
''' 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.


One thought on “IPython Notebook on AWS EC2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s