Skip to content

Instantly share code, notes, and snippets.

@dtsmith2001
Forked from jakechen/aws_jupyter_tunnel.md
Created November 19, 2019 14:30
Show Gist options
  • Select an option

  • Save dtsmith2001/bd9fd91cfd38ebb8a86640ec213042c3 to your computer and use it in GitHub Desktop.

Select an option

Save dtsmith2001/bd9fd91cfd38ebb8a86640ec213042c3 to your computer and use it in GitHub Desktop.
Creating and connecting to Jupyter Notebooks in AWS EC2

Introduction

This quick guide describes the steps to create a Jupyter Notebook on AWS then tunnel into it. This method is preferred since you do not open any additional ports besides 22, requires little-to-no configuration, and is generally more straight-forward.

Pre-requisites

This current version assumes basic familiarity with cloud computing, AWS services, and Jupyter Notebook. Mostly because this version won't have images and won't dive too deep into each individual step.

Steps

Spin up EC2 instance

  1. Log into EC2 console and click "Launch Instance" button.
  2. Inside "AWS Marketplace", select the "Deep Learning AMI" from AWS.
  3. Select instance type depending on your use case. The "Deep Learning AMI" has support for GPU-backed instance (e.g. g2 and p2) but it's not necessary to use these. Use the cheapest one for your workload (likely memory needed for your dataset).
  4. In most cases you can use default settings throughout the rest.
  5. Ensure the instance is assigned to a security group with SSH access.
  6. Launch your instance

Start Jupyter Notebook

  1. SSH into your newly launched instance.
  2. Start Jupyter Notebook in the background. Use the --no-browser flag to prevent the server from launching a browser. $ screen $ jupyter notebook --no-browser
  3. asdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment