No project description provided
Project description
Jupyter Deploy Terraform AWS EC2 Ngrok
This package provides a Terraform preset for deploying a Jupyter Server on AWS EC2 using ngrok for TLS.
Description
This terraform project creates an AWS EC2 instance in the default VPC that connects to ngrok for TLS.
The instance is configured so that you can access it using AWS SSM.
This project:
- places the instance in the first subnet of the default VPC
- select the latest AL 2023 AMI for
x86_64architecture - sets up an IAM role to enable SSM access
- passes on the root volume of the AMI
- adds an EBS volume which will mount on the Jupyter Server container
- creates an SSM instance-startup script, which references 3 files:
cloudinit.shfor the basic setup of the instancedocker-compose.ymlfor the docker services to run in the instancedocker-startup.shto run the docker-compose up cmd and post docker-start instructions
- creates an SSM association, which runs the startup script on the instance
Installation
From the root of this package, run:
pip install -e jupyter-deploy-tf-aws-ec2-ngrok
Usage
This package is used by jupyter-deploy. Once installed, the template will be automatically available for use via the jupyter-deploy CLI.
jupyter-deploy terraform generate --provider aws --infra ec2 --template tls-via-ngrok
Requirements
| Name | Version |
|---|---|
| terraform | >= 1.0 |
| aws | >= 4.66 |
Resources
| Name | Type |
|---|---|
| aws_security_group | resource |
| aws_instance | resource |
| aws_iam_role | resource |
| aws_iam_role_policy_attachment | resource |
| aws_iam_instance_profile | resource |
| aws_ebs_volume.jupyter_data | resource |
| aws_volume_attachment | resource |
| aws_ssm_document | resource |
| aws_ssm_association | resource |
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| aws_region | string |
null |
AWS region where the resources should be created |
| instance_type | string |
t3.micro |
The type of instance to start |
| key_name | string |
null |
The name of key pair |
| ami_id | string |
null |
The ID of the AMI to use for the instance |
| jupyter_data_volume_size | number |
30 |
The size in GB of the EBS volume the Jupyter Server has access to |
| jupyter_data_volume_type | string |
gp3 |
The type of EBS volume the Jupyter Server will has access to |
| iam_role_prefix | string |
JD-TlsViaNgrok-Exec |
The prefix for the name of the IAM role for the instance |
| custom_tags | map(string) |
{} |
The custom tags to add to all the resources |
| cloudinit.sh | file | - | bash script to install packages, mount volumes and setup permissions |
| docker-compose.yml | file | docker compose file to start the docker services | |
| docker-startup.sh | file | bash script to run docker-compose and post docker-start instructions |
Outputs
| Name | Description |
|---|---|
| aws_instance.id | The ID of the EC2 instance |
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a2.tar.gz.
File metadata
- Download URL: jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a2.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cccd34c9b53f3a6c35bf4880c5de3a183b6aed851c6d8b32d0c0fb618bc6738
|
|
| MD5 |
672879f1e09695d226329ad8f1088bab
|
|
| BLAKE2b-256 |
d3404c67be4da7a4d63c4a2de2cd09d980d66473b8d72e382131dc1d98eb10cb
|
File details
Details for the file jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: jupyter_deploy_tf_aws_ec2_ngrok_test-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c1460a8adb6536a8fb846ff65be8845202303564adf197bffba5462638f8f11
|
|
| MD5 |
ef6d1bdafdfa6ad69dae37fe41996b32
|
|
| BLAKE2b-256 |
4bb95ec653d11624b047efba9e6f071e2141ac32d015a7bab16aceb0c2bbfcfd
|