cdk-vscode-fargate
Project description
Welcome to cdk-vscode-fargate
cdk-vscode-fargate
is a JSII construct library for AWS CDK that allows you to deploy Code-server running VS Code remotely, on a AWS Fargate container.
By deploying the VSCodeFargate
construct, the following resources will be created:
- VPC (if not passed in as a prop)
- ACM DNS validated certificate
- ECS Cluster
- EFS file system
- ALB Fargate Service
- Security Groups
- Secrets Manager secret (for login authorization)
Howto
Create a new project with AWS CDK
$ mkdir my-vscode-fargate && cd my-vscode-fargate
# initialize the AWS CDK project
$ cdk init -l typescript
# install the cdk-vscode-fargate npm module
$ yarn add cdk-vscode-fargate
AWS CDK sample
Building your serverless VS Code service with the VSCodeFargate
construct:
Update ./lib/my-vscode-fargate-stack.ts
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_cdk.aws_ec2 as ec2
import aws_cdk.core as cdk
from cdk_vscode_fargate import VSCodeFargate
class CdkStack(cdk.Stack):
def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)
subdomain = process.env.VSCODE_SUBDOMAIN ?? "vscode"
domain_name = process.env.VSCODE_DOMAIN_NAME ?? "mydomain.com"
vpc = ec2.Vpc.from_lookup(self, "Vpc",
is_default=True
)
VSCodeFargate(self, "MyVSCodeFargate",
domain_name=domain_name,
subdomain=subdomain,
vpc=vpc
)
diff the CDK stack:
$ cdk deploy
deploy the CDK stack:
$ cdk diff
On deploy completion, the subdomain/domain name assigned to the load balancer will be returned in the Output. Click the URL and you will see the login page:
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
cdk-vscode-fargate-0.0.40.tar.gz
(475.4 kB
view hashes)
Built Distribution
Close
Hashes for cdk-vscode-fargate-0.0.40.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a8da2c31f8a4f57b04f43e572aa7a7df95526ea46d7e2663af03e080b8723a |
|
MD5 | 3eb0eef66b04d428ca2a8032db45d27e |
|
BLAKE2b-256 | cee47939e95dc70e344be214c337dc2c699a61e78c430efd5354c76300596cdd |
Close
Hashes for cdk_vscode_fargate-0.0.40-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0165b01a559e770a47d4c7d9bf65bf942a167f3f7266d94c07b7d019fcd698f7 |
|
MD5 | e8b0a7a3748b98ef5f99d25291deb429 |
|
BLAKE2b-256 | afa716de1ae12787aa17b8219085aa40c41c97f03e2677c11f451dc0b158ef76 |