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.32.tar.gz
(475.6 kB
view hashes)
Built Distribution
Close
Hashes for cdk-vscode-fargate-0.0.32.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6854677e3a97a4dd999d06b8124f015ab433f5f333e6fede3a41edef367348ec |
|
MD5 | 6a0339d5f845bed6264a2513d6aa20a6 |
|
BLAKE2b-256 | 2475be0f6fb2f853d5a323687dc593cdf51ac1f1a53046654e37eee623926519 |
Close
Hashes for cdk_vscode_fargate-0.0.32-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bada6399e29c97cc8b2d3a73a1c62fc26954166fc9f5ae7ed6d36898f5a8d6a |
|
MD5 | 74d11baf64b0f8311c6261fa8969230c |
|
BLAKE2b-256 | aa599b6d8988be7410d5a65a512cc010dd014381041c393abe172eae9d552351 |