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:443over 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-inforeads live. - Auth:
jd proxy connect-infomints ak8s-aws-v1STS-identity token; a ForwardAuth sidecar behind Traefik validates it (STS replay + ARN allowlist +x-k8s-aws-idbinding). No shared secret is stored anywhere. - Network: the security group allows inbound
:443only (open to0.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.
Metadata
Release files for jupyter-deploy-tf-aws-ec2-jupyterlab 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0.tar.gz | 139.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 238.2 kB
Release files / jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0.tar.gz
| Download URL | jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0.tar.gz |
|---|---|
| Size | 139.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c07c4dfb50a1b0b226d6eb45600643c4ffd6b1a4c7deb943a169529402765757
|
|
BLAKE2b-256 checksum How to use checksums |
48ce8a09d13d9b7d748e05ba7346d3117b3079b8e284c05688703f5c311b4b73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}
|
Release files / jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0-py3-none-any.whl
| Download URL | jupyter_deploy_tf_aws_ec2_jupyterlab-0.1.0-py3-none-any.whl |
|---|---|
| Size | 99.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
766bc68a631fb9b901d6c4ac679d68cdc425365583e30698399ca7bbf9611442
|
|
BLAKE2b-256 checksum How to use checksums |
73fc1b79fde95afa6531e5bee44437dcbdf52f6c95f64158f62cd45ea9df2094
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","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}
|