- Install Python tooling and create an isolated virtual environment.
- Install and run the classic Jupyter Notebook server and connect from a browser.
- Create and run notebook code and markdown cells.
- Install and explore JupyterLab and its integrated features.
- Review security considerations for remote notebooks.
1. Launch and connect to the EC2 Ubuntu instance
In the AWS Management Console I launched a fresh Ubuntu EC2 instance and opened a shell from the console using Instance Connect.
python command is not always present — use python3:
2. Install pip and create a virtual environment (recommended)
On Ubuntu 24.04+ you may need to install pip and the venv helper:Use virtual environments to isolate project dependencies. This keeps system packages clean and prevents conflicting versions across projects.
3. Install and run the classic Jupyter Notebook server
Install Jupyter Notebook inside the virtual environment:Do not expose a Jupyter server directly to the public internet without proper authentication and TLS. Prefer SSH tunneling, a VPN, or secure application endpoints to protect access.
4. Connect from a browser, create a notebook, and run cells
Open the corrected URL in your browser (public IP or a tunneled localhost URL). The classic Jupyter file view appears. Create a new Python 3 notebook and try code and markdown cells. Example code cells and outputs:- Shift+Enter — run cell and advance.
- Ctrl+Enter — run cell in place.
- Execution order appears as bracket numbers [1], [2].
5. Install and use JupyterLab (modern UI)
JupyterLab is a more integrated, IDE-like interface that combines notebooks, terminals, file browser, and extensions. Install and launch JupyterLab:- Launcher for notebooks, consoles, and terminals.
- Split panes and tabbed layout for working on multiple files concurrently.
- Integrated terminal to run shell commands and pip inside the environment.
- Extension support (e.g., Git integration, code formatters, plot viewers).

6. Quick reference — commands and tips
| Task | Command / Tip | Notes |
|---|---|---|
| Install system deps | sudo apt install -y python3-pip python3-venv | Ubuntu 24.04+ |
| Create venv | python3 -m venv jupyter_env | Activate with source jupyter_env/bin/activate |
| Install classic notebook | pip install jupyter | Starts with jupyter notebook |
| Install JupyterLab | pip install jupyterlab | Starts with jupyter lab |
| Run server | jupyter notebook —ip=0.0.0.0 —no-browser | Replace private IP with public, or tunnel |
| Secure access | Use SSH tunnel or VPN | Do not leave ports open publicly |
7. Recap — what we covered
| Step | Summary |
|---|---|
| 1 | Verified Python is available (use python3 on modern Ubuntu). |
| 2 | Installed pip and python3-venv; created and activated a virtual environment. |
| 3 | Installed Jupyter (classic) and launched it for remote access. |
| 4 | Created notebooks, added code and markdown cells, executed cells, and inspected outputs. |
| 5 | Installed and launched JupyterLab to use an IDE-like interface with terminals and extensions. |
| 6 | Emphasized security: replace private IPs with public IPs or use SSH tunneling and avoid public exposure. |

- Jupyter Documentation
- SSH tunneling and port forwarding (search “ssh local port forwarding” for tutorials)
- AWS SageMaker course — KodeKloud