Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Jupyter Deploy AWS EC2 JupyterLab template

Terraform template that runs a single-user JupyterLab on a remote AWS EC2 instance, reached from your laptop through the local jupyter-deploy-client-proxy over a pinned self-signed TLS connection, authenticated with short-lived AWS-identity (STS) tokens.

AWS credentials are the only prerequisite.

jd init . -E terraform -P aws -I ec2 -T jupyterlab   # default template = aws:ec2:jupyterlab
jd config                                            # region, instance type, volume size
jd up                                                # provision instance + self-signed cert
jd open                                              # start the proxy and open the browser

How it works

  • Data path: the browser talks to a local proxy over http://localhost; the proxy talks to the instance's Traefik on :443 over pinned self-signed TLS (the pin is on the cert, not the address, so a new public IP after a stop/start is a non-event).
  • Cert pin: the instance generates a long-lived self-signed cert at boot (private key persisted on the EBS data volume) and publishes only the public PEM to an SSM parameter that jd proxy connect-info reads live.
  • Auth: jd proxy connect-info mints a k8s-aws-v1 STS-identity token; a ForwardAuth sidecar behind Traefik validates it (STS replay + ARN allowlist + x-k8s-aws-id binding). No shared secret is stored anywhere.
  • Network: the security group allows inbound :443 only (open to 0.0.0.0/0); the access boundary is the pinned TLS cert plus the STS-identity token above, not the network layer.

Managing access

The deploying identity is always authorized. To grant others (matched case-insensitively by bare IAM name, scoped to this account), use the runtime commands — they recreate only the auth-sidecar (~1-2s), leave JupyterLab running, and write the change back into the terraform variables so jd up stays in sync:

  • IAM roles: jd teams add|remove|set|list <RoleName>...
  • IAM users: jd users add|remove|set|list <name>...

(jd teams → IAM roles, jd users → IAM users.) The iam_role_names_allowlist / iam_user_names_allowlist variables are the source of truth — editing them and running jd up also reconciles the allowlist, but restarts the whole app, so the commands above are preferred for routine access changes. Because those commands write their change back into the variables, a later jd up re-applies the same list rather than reverting it.

New IAM permissions

The local CLI credentials need, in addition to the base SSM permissions: ec2:DescribeInstances (resolve the instance IP) and ssm:GetParameter (read the cert pin). jd host start/stop additionally use ec2:StartInstances / ec2:StopInstances.

License

MIT License. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0rc2.tar.gz.

File metadata

  • Download URL: jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0rc2.tar.gz
  • Upload date:
  • Size: 69.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0rc2.tar.gz
Algorithm Hash digest
SHA256 daedb131bef1ec155863aa535c45089e46f89d0eea11f35427878506980a4b27
MD5 7123b2518c441b13822abfa182a9148c
BLAKE2b-256 8bbcbd0ec2c60aac76acd891a3d592102bb87d49779068309fbc1aeada97f697

See more details on using hashes here.

File details

Details for the file jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0rc2-py3-none-any.whl.

File metadata

  • Download URL: jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 85.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 cead73610a15a0bd3a2202cffa68c9fe5ab83dcb2118fc1b5118f92a3602449d
MD5 f90d902068e72be78e5f03193e07858e
BLAKE2b-256 b80e22408d0990889b5b8fe8cba68b331fc55c2a2670791c7ed64a8b7b86b2ba

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0rc2 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page