Deshwal
Deshwal

Reputation: 4162

Connected to AWS AMI instance but how can I use Jupyter notebook now?

I am connected to AWS AMI uaing ``Puttyand when I doconda env listit shows me all the environments. even the jupyter notebook get started when I dojupyter notebook`, it shows me:

[I 08:00:27.549 NotebookApp] Using EnvironmentKernelSpecManager...
[I 08:00:27.550 NotebookApp] Started periodic updates of the kernel list (every 3 minutes).
[I 08:00:27.778 NotebookApp] Loading IPython parallel extension
[I 08:00:27.808 NotebookApp] JupyterLab extension loaded from /home/ubuntu/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 08:00:27.809 NotebookApp] JupyterLab application directory is /home/ubuntu/anaconda3/share/jupyter/lab
[I 08:00:27.974 NotebookApp] [nb_conda] enabled
[I 08:00:27.975 NotebookApp] Serving notebooks from local directory: /home/ubuntu
[I 08:00:27.975 NotebookApp] The Jupyter Notebook is running at:
[I 08:00:27.975 NotebookApp] http://localhost:8888/
[I 08:00:27.975 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 08:00:27.979 NotebookApp] No web browser found: could not locate runnable browser.
[I 08:00:27.979 NotebookApp] Starting initial scan of virtual environments...
[I 08:00:29.943 NotebookApp] Found new kernels in environments: conda_aws_neuron_pytorch_p36, conda_python3, conda_mxnet_latest_p37, conda_aws_neuron_mxnet_p36, conda_pytorch_p36, conda_tensorflow2_latest_p37, conda_tensorflow2_p36, conda_tensorflow_p37, conda_anaconda3, conda_mxnet_p36, conda_aws_neuron_tensorflow_p36, conda_pytorch_latest_p37

How can I access Notebook running on AWS in my Browser?

Upvotes: 1

Views: 257

Answers (1)

Marcin
Marcin

Reputation: 238967

Your notebook is listening on localhost on the instance on port 8888 (http://localhost:8888). It is accessible only from within instnace, unless you want to fully expose port 8888, which is not a good practice.

The better way is though ssh tunnel. Thus, you would establish an ssh tunnel using putty between your local machine and your instance. There are many tutorials on how to do it in putty. Here is one example:

In the tutorial you would use port 8888 instead of 1234 which they show. Once the tunnel is up, you can access your notebook in the browser as http://localhost:8888.

Another example on accessing notebooks though ssh tunnel using putty is here.

Upvotes: 1

Related Questions