Using Jupyter Notebook with Anaconda on Amazon Web Services (EC2)

There are times when you are dealing with huge data sets and your PC falls short of processing the data. That’s where in AWS come into the picture. This post talks about installing Anaconda and Jupyter Notebook on an existing AWS EC2 instance. So, let’s start –

  • Assuming that your AWS EC2 instance is up and running, you connect to it through putty with a windows machine or the Linux terminal. Type the the following to download Anaconda. (You can make a downloads directory and cd to it to keep things clean)
  • I’m using Anaconda with Python 3, you can head over here to select the version of Anaconda that you prefer.
  • Now for the installation.
  • Now all you gotta do is accept the terms and conditions.
  • After the installation is done, source Anaconda.
source .bashrc
  • Before opening a Jupyter Notebook, update conda with this.
conda update conda
  • Once that is finished, open the Jupyter Notebook
jupyter notebook --no-browser --port=8888
  • The final step is SSH tunneling to your notebook.
ssh -L 8000:localhost:8888 your_server_username@your_server_ip
jupyter notebook
  • You can use Putty’s tunnel option if you are on windows.
  • Now, from a web browser on your local machine, open the Jupyter Notebook web interface by going to http://localhost:8000

Please follow and like us:

Leave a Reply

3 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
0 Comment authors
newest oldest most voted
Notify of

Good article

[…] while trying to launch a new Jupyter notebook instance from Anaconda Navigator. JupyterLab is a new interface for python development […]

[…] Going back to the notebook, you could check out some of our other blogs to understand how to use Jupyter on local and other cloud services. […]