@mavogel/cdk-vscode-server 0.0.62 → 0.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.jsii +117 -178
  2. package/API.md +96 -199
  3. package/CLAUDE.md +214 -57
  4. package/README.md +39 -1
  5. package/assets/idle-monitor-enabler/idle-monitor-enabler.lambda/index.js +67 -0
  6. package/assets/installer/installer.lambda/index.js +67 -30
  7. package/awslint.json +5 -0
  8. package/examples/git-repo/main.ts +30 -0
  9. package/integ-tests/integ.al2023.ts.snapshot/IntegSetupVSCodeOnAl2023DefaultTestDeployAssert74D8F645.assets.json +2 -2
  10. package/integ-tests/integ.al2023.ts.snapshot/IntegSetupVSCodeOnAl2023DefaultTestDeployAssert74D8F645.template.json +1 -1
  11. package/integ-tests/integ.al2023.ts.snapshot/IntegTestStackAl2023.assets.json +8 -8
  12. package/integ-tests/integ.al2023.ts.snapshot/IntegTestStackAl2023.template.json +257 -94
  13. package/integ-tests/{integ.stop-on-idle.ts.snapshot/asset.33da23274e25bd9f43638c5d83dad26e3931cbe78d462ffd9a9f565e948b4f5f.lambda → integ.al2023.ts.snapshot/asset.2f99f38311da357eaaea1284d67c759759324dec4a1cd11621d9c59eea9e81df.lambda}/index.js +67 -30
  14. package/integ-tests/{integ.ubuntu.ts.snapshot/asset.0ad50fc42afd768c3d0bfdd4701e43284fb077a25f19eea1e8c51a5ca36ebfe4 → integ.al2023.ts.snapshot/asset.efac30c7091c58fed492058fa6403c14f7e58aab8cf4fd595d838b8d5eeec2b9}/index.js +50 -25
  15. package/integ-tests/integ.al2023.ts.snapshot/integ.json +1 -1
  16. package/integ-tests/integ.al2023.ts.snapshot/manifest.json +19 -3
  17. package/integ-tests/integ.al2023.ts.snapshot/tree.json +1 -1
  18. package/integ-tests/integ.custom-domain.ts.snapshot/IntegSetupVSCodeOnCustomDomainDefaultTestDeployAssert6982D514.assets.json +2 -2
  19. package/integ-tests/integ.custom-domain.ts.snapshot/IntegSetupVSCodeOnCustomDomainDefaultTestDeployAssert6982D514.template.json +1 -1
  20. package/integ-tests/integ.custom-domain.ts.snapshot/IntegTestStackCustomDomain.assets.json +8 -8
  21. package/integ-tests/integ.custom-domain.ts.snapshot/IntegTestStackCustomDomain.template.json +270 -94
  22. package/integ-tests/{integ.ubuntu.ts.snapshot/asset.33da23274e25bd9f43638c5d83dad26e3931cbe78d462ffd9a9f565e948b4f5f.lambda → integ.custom-domain.ts.snapshot/asset.2f99f38311da357eaaea1284d67c759759324dec4a1cd11621d9c59eea9e81df.lambda}/index.js +67 -30
  23. package/integ-tests/{integ.al2023.ts.snapshot/asset.0ad50fc42afd768c3d0bfdd4701e43284fb077a25f19eea1e8c51a5ca36ebfe4 → integ.custom-domain.ts.snapshot/asset.efac30c7091c58fed492058fa6403c14f7e58aab8cf4fd595d838b8d5eeec2b9}/index.js +50 -25
  24. package/integ-tests/integ.custom-domain.ts.snapshot/integ.json +1 -1
  25. package/integ-tests/integ.custom-domain.ts.snapshot/manifest.json +19 -3
  26. package/integ-tests/integ.custom-domain.ts.snapshot/tree.json +1 -1
  27. package/integ-tests/integ.stop-on-idle.ts +1 -4
  28. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegStopOnIdleFunctionalityDefaultTestDeployAssertEECF3FC0.assets.json +2 -2
  29. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegStopOnIdleFunctionalityDefaultTestDeployAssertEECF3FC0.template.json +4 -4
  30. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegTestStackStopOnIdle.assets.json +23 -9
  31. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegTestStackStopOnIdle.template.json +755 -194
  32. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.22c8a6c357b704e370bef317ae1b52c59f684aa7640422a3d1dfe813d1f77853.lambda/index.js +67 -0
  33. package/integ-tests/{integ.custom-domain.ts.snapshot/asset.33da23274e25bd9f43638c5d83dad26e3931cbe78d462ffd9a9f565e948b4f5f.lambda → integ.stop-on-idle.ts.snapshot/asset.2f99f38311da357eaaea1284d67c759759324dec4a1cd11621d9c59eea9e81df.lambda}/index.js +67 -30
  34. package/integ-tests/integ.stop-on-idle.ts.snapshot/manifest.json +353 -72
  35. package/integ-tests/integ.stop-on-idle.ts.snapshot/tree.json +1 -1
  36. package/integ-tests/integ.ubuntu.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.assets.json +2 -2
  37. package/integ-tests/integ.ubuntu.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.template.json +1 -1
  38. package/integ-tests/integ.ubuntu.ts.snapshot/IntegTestStackUbuntu22.assets.json +8 -8
  39. package/integ-tests/integ.ubuntu.ts.snapshot/IntegTestStackUbuntu22.template.json +270 -94
  40. package/integ-tests/{integ.al2023.ts.snapshot/asset.33da23274e25bd9f43638c5d83dad26e3931cbe78d462ffd9a9f565e948b4f5f.lambda → integ.ubuntu.ts.snapshot/asset.2f99f38311da357eaaea1284d67c759759324dec4a1cd11621d9c59eea9e81df.lambda}/index.js +67 -30
  41. package/integ-tests/{integ.custom-domain.ts.snapshot/asset.0ad50fc42afd768c3d0bfdd4701e43284fb077a25f19eea1e8c51a5ca36ebfe4 → integ.ubuntu.ts.snapshot/asset.efac30c7091c58fed492058fa6403c14f7e58aab8cf4fd595d838b8d5eeec2b9}/index.js +50 -25
  42. package/integ-tests/integ.ubuntu.ts.snapshot/integ.json +1 -1
  43. package/integ-tests/integ.ubuntu.ts.snapshot/manifest.json +19 -3
  44. package/integ-tests/integ.ubuntu.ts.snapshot/tree.json +1 -1
  45. package/integ-tests/integ.ubuntu24.ts +69 -0
  46. package/integ-tests/integ.ubuntu24.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.assets.json +33 -0
  47. package/integ-tests/integ.ubuntu24.ts.snapshot/IntegSetupVSCodeOnUbuntuDefaultTestDeployAssertFF8DF2C5.template.json +337 -0
  48. package/integ-tests/integ.ubuntu24.ts.snapshot/IntegTestStackUbuntu24.assets.json +118 -0
  49. package/integ-tests/integ.ubuntu24.ts.snapshot/IntegTestStackUbuntu24.template.json +2725 -0
  50. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d/index.js +1 -0
  51. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.2f99f38311da357eaaea1284d67c759759324dec4a1cd11621d9c59eea9e81df.lambda/index.js +180 -0
  52. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.530055f7515b3f0a47900f5df37e729ba40ca977b2d07b952bdefa2b8f883f42.bundle/index.js +30676 -0
  53. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.781ab0ab74634cdaf61539ab208ab777829ef07097ac21f95b9e15a3b1eedc1b.lambda/index.js +57 -0
  54. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
  55. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/index.js +1 -0
  56. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.9d043014be736e8162bcc7ec5590cc6d2ff24fd0d9c73a5c5d595151c5fdad00/index.js +1 -0
  57. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
  58. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/consts.js +1 -0
  59. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/framework.js +3 -0
  60. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/outbound.js +1 -0
  61. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
  62. package/integ-tests/integ.ubuntu24.ts.snapshot/asset.efac30c7091c58fed492058fa6403c14f7e58aab8cf4fd595d838b8d5eeec2b9/index.js +6017 -0
  63. package/integ-tests/integ.ubuntu24.ts.snapshot/integ.json +23 -0
  64. package/integ-tests/integ.ubuntu24.ts.snapshot/manifest.json +1473 -0
  65. package/integ-tests/integ.ubuntu24.ts.snapshot/tree.json +1 -0
  66. package/lib/idle-monitor/idle-monitor-function.js +2 -2
  67. package/lib/idle-monitor/idle-monitor.js +5 -2
  68. package/lib/idle-monitor-enabler/idle-monitor-enabler-function.d.ts +13 -0
  69. package/lib/idle-monitor-enabler/idle-monitor-enabler-function.js +22 -0
  70. package/lib/idle-monitor-enabler/idle-monitor-enabler.d.ts +25 -0
  71. package/lib/idle-monitor-enabler/idle-monitor-enabler.js +76 -0
  72. package/lib/idle-monitor-enabler/idle-monitor-enabler.lambda.d.ts +9 -0
  73. package/lib/idle-monitor-enabler/idle-monitor-enabler.lambda.js +48 -0
  74. package/lib/index.d.ts +0 -1
  75. package/lib/index.js +1 -2
  76. package/lib/installer/installer-function.js +2 -2
  77. package/lib/installer/installer.d.ts +100 -0
  78. package/lib/installer/installer.js +658 -301
  79. package/lib/installer/installer.lambda.js +64 -30
  80. package/lib/secret-retriever/secret-retriever-function.js +2 -2
  81. package/lib/vscode-server.d.ts +40 -0
  82. package/lib/vscode-server.js +27 -4
  83. package/package.json +12 -12
  84. package/.claude/hooks/file_checker.sh +0 -178
  85. package/.qlty/.gitignore +0 -7
  86. package/.qlty/configs/.yamllint.yaml +0 -21
  87. package/.qlty/qlty.toml +0 -115
  88. package/assets/status-check/status-check.lambda/index.js +0 -123
  89. package/integ-tests/integ.al2023.ts.snapshot/cdk.out +0 -1
  90. package/integ-tests/integ.al2023.ts.snapshot/read.13497.1.lock +0 -1
  91. package/integ-tests/integ.custom-domain.ts.snapshot/read.13497.1.lock +0 -1
  92. package/integ-tests/integ.ubuntu.ts.snapshot/cdk.out +0 -1
  93. package/integ-tests/integ.ubuntu.ts.snapshot/read.13497.1.lock +0 -1
  94. package/lib/status-check/status-check-function.d.ts +0 -13
  95. package/lib/status-check/status-check-function.js +0 -22
  96. package/lib/status-check/status-check.d.ts +0 -36
  97. package/lib/status-check/status-check.js +0 -109
  98. package/lib/status-check/status-check.lambda.d.ts +0 -2
  99. package/lib/status-check/status-check.lambda.js +0 -104
package/.jsii CHANGED
@@ -11,9 +11,9 @@
11
11
  "node-html-parser": "^7.0.1"
12
12
  },
13
13
  "dependencies": {
14
- "@mavogel/mvc-projen": "^0.0.7",
14
+ "@mavogel/mvc-projen": "^0.0.12",
15
15
  "aws-cdk-lib": "^2.190.0",
16
- "cdk-nag": "^2.35.0",
16
+ "cdk-nag": "^2.37.55",
17
17
  "constructs": "^10.0.5"
18
18
  },
19
19
  "dependencyClosure": {
@@ -4050,6 +4050,7 @@
4050
4050
  "projen.gitlab": {},
4051
4051
  "projen.java": {},
4052
4052
  "projen.javascript": {},
4053
+ "projen.javascript.biome_config": {},
4053
4054
  "projen.python": {},
4054
4055
  "projen.release": {},
4055
4056
  "projen.typescript": {},
@@ -4082,7 +4083,7 @@
4082
4083
  "stability": "experimental"
4083
4084
  },
4084
4085
  "homepage": "https://github.com/MV-Consulting/cdk-vscode-server.git",
4085
- "jsiiVersion": "5.8.22 (build 160a3ef)",
4086
+ "jsiiVersion": "5.9.11 (build e3d2007)",
4086
4087
  "keywords": [
4087
4088
  "aws",
4088
4089
  "cdk",
@@ -4101,7 +4102,7 @@
4101
4102
  },
4102
4103
  "name": "@mavogel/cdk-vscode-server",
4103
4104
  "readme": {
4104
- "markdown": "![Source](https://img.shields.io/github/stars/MV-Consulting/cdk-vscode-server?logo=github&label=GitHub%20Stars)\n[![Build Status](https://github.com/MV-Consulting/cdk-vscode-server/actions/workflows/build.yml/badge.svg)](https://github.com/MV-Consulting/cdk-vscode-server/actions/workflows/build.yml)\n[![ESLint Code Formatting](https://img.shields.io/badge/code_style-eslint-brightgreen.svg)](https://eslint.org)\n[![Latest release](https://img.shields.io/github/release/MV-Consulting/cdk-vscode-server.svg)](https://github.com/MV-Consulting/cdk-vscode-server/releases)\n![GitHub](https://img.shields.io/github/license/MV-Consulting/cdk-vscode-server)\n[![npm](https://img.shields.io/npm/dt/@mavogel/cdk-vscode-server?label=npm&color=orange)](https://www.npmjs.com/package/@mavogel/cdk-vscode-server)\n[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@mavogel/cdk-vscode-server)\n\n# cdk-vscode-server\n\nRunning your dev IDE vscode on AWS for development and workshop purposes.\n\n> [!Note]\n> This construct is designed for workshop purposes and does not fulfill all security and authentication best practices.\n\n![EXPERIMENTAL](https://img.shields.io/badge/stability-experimantal-orange?style=for-the-badge)**<br>This is an early version of the package. The API will change while I\nwe implement new features. Therefore make sure you use an exact version in your `package.json` before it reaches 1.0.0.**\n\n## Table of Contents\n\n- [Features](#features)\n- [Usage](#usage)\n - [Standard](#Standard)\n - [Custom Domain Configuration](#custom-domain-configuration)\n- [Solution Design](#solution-design)\n- [Inspiration](#inspiration)\n\n## Features\n\n- ⚡ **Quick Setup**: Spin up and configure your [vscode](https://code.visualstudio.com/) server in under 10 minutes in your AWS account\n- 📏 **Best Practice Setup**: Set up with [projen](https://projen.io/) and a [single configuration file](./.projenrc.ts) to keep your changes centralized.\n- 🤹‍♂️ **Pre-installed packages**: Besides the [vscode](https://code.visualstudio.com/) server, other tools and software packages such as `git`, `docker`, `awscli` `nodejs` and `python` are pre-installed on the EC2 instance.\n- 🌐 **Custom Domain Support**: Use your own domain name with automatic ACM certificate creation and Route53 DNS configuration, or bring your existing certificate.\n- 💰 **Auto-Stop**: Automatically stop EC2 instances after inactivity with Elastic IP retention - save up to 75% on costs for development environments\n- 🏗️ **Extensibility**: Pass in properties to the construct, which start with `additional*`. They allow you to extend the configuration to your needs. There are more to come...\n\n## Usage\nActually we supported 2 modes:\n\n### Standard\nThe following steps get you started:\n\n1. Create a new `awscdk-app` via\n```bash\nnpx projen new awscdk-app-ts --package-manager=npm\n```\n3. Add `@mavogel/cdk-vscode-server` as a dependency to your project in the `.projenrc.ts` file\n4. Run `npx projen` to install it\n5. Add the following to the `src/main.ts` file:\n```ts\nimport { App, Stack, StackProps } from 'aws-cdk-lib';\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { Construct } from 'constructs';\nimport {\n LinuxArchitectureType,\n LinuxFlavorType,\n VSCodeServer\n} from '@mavogel/cdk-vscode-server';\n\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n new VSCodeServer(this, 'vscode', {\n // for example (or simply use the defaults by not setting the properties)\n instanceVolumeSize: 8,\n instanceClass: ec2.InstanceClass.M7G,\n instanceSize: ec2.InstanceSize.LARGE,\n instanceOperatingSystem: LinuxFlavorType.UBUNTU_22,\n instanceCpuArchitecture: LinuxArchitectureType.ARM,\n\n // 👇🏽 or if you want to give the InstanceRole more permissions\n additionalInstanceRolePolicies: [\n new iam.PolicyStatement({\n effect: iam.Effect.ALLOW,\n actions: [\n 'codebuild:*',\n ],\n resources: [\n `arn:aws:codebuild:*:${Stack.of(this).account}:*/*`,\n ],\n }),\n ]\n\n // and more... 💡\n });\n }\n}\n\nconst env = {\n account: '123456789912',\n region: 'eu-central-1',\n};\n\nconst app = new App();\nnew MyStack(app, 'vscode-server', { env });\napp.synth();\n```\n\nand deploy it\n```bash\nnpx projen build\nnpx projen deploy\n```\n\nwith the output\n```console\n✨ Deployment time: 509.87s\n\nOutputs:\ndev.vscodedomainName6729AA39 = https://d1foo65bar4baz.cloudfront.net/?folder=/Workshop\ndev.vscodepassword64FBCA12 = foobarbaz\n```\n\nSee the [examples](./examples) folder for more inspiration.\n\n### Custom Domain Configuration\n\nYou can configure your VS Code Server with a custom domain name instead of using the default CloudFront domain. The construct supports three different configuration options:\n\n#### Option 1: Auto-create Certificate with DNS Validation\n```ts\nnew VSCodeServer(this, 'vscode', {\n domainName: 'vscode.example.com',\n hostedZoneId: 'Z123EXAMPLE456', // optional - will auto-discover if not provided\n autoCreateCertificate: true,\n});\n```\n\nThis will:\n- Create an ACM certificate in us-east-1 (required for CloudFront)\n- Validate the certificate using DNS validation\n- Create a Route53 A record pointing to the CloudFront distribution\n- Configure the CloudFront distribution with the custom domain\n\n#### Option 2: Use Existing Certificate\n```ts\nnew VSCodeServer(this, 'vscode', {\n domainName: 'vscode.example.com',\n hostedZoneId: 'Z123EXAMPLE456',\n certificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012',\n});\n```\n\n**Requirements:**\n- Certificate must be in us-east-1 region\n- Certificate must be validated and ready to use\n- Certificate must include the domain name\n\n#### Option 3: Default (No Custom Domain)\n```ts\nnew VSCodeServer(this, 'vscode', {\n // No domain configuration - uses CloudFront default domain\n});\n```\n\nFor complete examples, see [examples/custom-domain/main.ts](./examples/custom-domain/main.ts).\n\n6. Then open the domain name in your favorite browser and you'd see the following login screen:\n![vscode-server-ui-login](docs/img/vscode-server-ui-login-min.png)\n\n7. After entering the password, you are logged into VSCode and can start coding :tada:\n\n![vscode-server-ui](docs/img/vscode-server-ui-min.png)\n\n> [!Important]\n> There are issues with copy pasting into the VSCode terminal within the Firefox browser (2025-01-12)\n\n### Auto-Stop Configuration\n\nSave up to 75% on costs by automatically stopping EC2 instances when idle:\n\n```ts\nnew VSCodeServer(this, 'vscode', {\n enableAutoStop: true, // Enable auto-stop feature\n idleTimeoutMinutes: 30, // Stop after 30 minutes of no activity (default)\n idleCheckIntervalMinutes: 5, // Check for idle activity every 5 minutes (default)\n});\n```\n\n**How it works:**\n1. **Idle Detection**: Monitors CloudFront request metrics at configured intervals (default: every 5 minutes)\n2. **Auto-Stop**: Stops the EC2 instance after the configured idle timeout when no requests are detected\n3. **Static IP**: Allocates an Elastic IP to maintain a consistent public IP address across stop/start cycles\n4. **Manual Resume**: Users can manually start the instance via AWS Console or CLI when needed\n\n**Cost Savings Example:**\n- **Without auto-stop**: m7g.xlarge running 24/7 = ~$120/month\n- **With auto-stop** (8 hours/day, 5 days/week): ~$30/month\n- **Savings**: ~$90/month (75% reduction)\n\n**Additional costs:**\n- Elastic IP (allocated): ~$3.65/month\n- Lambda function (IdleMonitor): ~$0.10/month\n- EventBridge rule: Negligible\n- **Net savings**: ~$86/month per instance\n\n**Architecture Components:**\n- Elastic IP for consistent public addressing\n- EventBridge rule triggering idle monitoring at configured intervals\n- IdleMonitor Lambda function checking CloudWatch metrics for request activity\n- CloudWatch metrics from CloudFront distribution\n\n**Integration Testing:**\n\nThe stop-on-idle functionality includes comprehensive integration tests (`integ-tests/integ.stop-on-idle.ts`) that verify the complete workflow:\n\n1. **Phase 1 - Verify Auto-Stop**: Waits for the instance to automatically stop after the configured idle timeout\n2. **Phase 2 - Disable IdleMonitor**: Disables the EventBridge rule to prevent the instance from being stopped again during testing\n3. **Phase 3 - Start Instance**: Starts the stopped instance and waits for it to reach the running state\n4. **Phase 4 - Verify Login**: Confirms that VS Code Server is accessible through CloudFront after the instance has been restarted\n\nThis 4-phase test ensures that:\n- Idle detection works correctly based on CloudWatch metrics\n- Instance stops automatically when no activity is detected\n- Instance can be successfully restarted after being stopped\n- VS Code Server remains accessible after stop/start cycles\n- Elastic IP maintains connectivity across state changes\n\nRun integration tests with:\n```bash\nnpm run integ-test\n```\n\n## Solution Design\n\n<details>\n <summary>... if you're curious about click here for the details</summary>\n\n![vscode-server-solution-design](docs/img/vscode-server.drawio-min.png)\n\n</details>\n\n## Inspiration\nThis project was created based on the following inspiration\n\n- [vscode-on-ec2-for-prototyping](https://github.com/aws-samples/vscode-on-ec2-for-prototyping): as baseline, which unfortunately was outdated\n- [aws-terraform-dev-container](https://github.com/awslabs/aws-terraform-dev-container): as baseline for terraform, but unfortunately also outdated\n- [java-on-aws-workshop-ide-only.yaml](https://github.com/aws-samples/java-on-aws/blob/main/labs/unicorn-store/infrastructure/cfn/java-on-aws-workshop-ide-only.yaml): an already synthesized cloudformation stack, which used mostly python as the custom resources\n- [fleet-workshop-team-stack-self.json](https://static.us-east-1.prod.workshops.aws/public/cc4aa67e-5b7a-4df1-abf7-c42502899a25/assets/fleet-workshop-team-stack-self.json): also an already synthesized cloudformation stack, which did much more as I currently implemented here.\n- [eks-workshop-vscode-cfn.yaml](https://github.com/aws-samples/eks-workshop-v2/blob/main/lab/cfn/eks-workshop-vscode-cfn.yaml): another great baseline\n\n\n## 🚀 Unlock the Full Potential of Your AWS Cloud Infrastructure\n\nHi, I’m Manuel, an AWS expert passionate about empowering businesses with **scalable, resilient, and cost-optimized cloud solutions**. With **MV Consulting**, I specialize in crafting **tailored AWS architectures** and **DevOps-driven workflows** that not only meet your current needs but grow with you.\n\n---\n\n### 🌟 Why Work With Me?\n\n✔️ **Tailored AWS Solutions:** Every business is unique, so I design custom solutions that fit your goals and challenges.\n✔️ **Well-Architected Designs:** From scalability to security, my solutions align with AWS Well-Architected Framework.\n✔️ **Cloud-Native Focus:** I specialize in modern, cloud-native systems that embrace the full potential of AWS.\n✔️ **Business-Driven Tech:** Technology should serve your business, not the other way around.\n\n---\n\n### 🛠 What I Bring to the Table\n\n🔑 **12x AWS Certifications**\nI’m **AWS Certified Solutions Architect and DevOps – Professional** and hold numerous additional certifications, so you can trust I’ll bring industry best practices to your projects. Feel free to explose by [badges](https://www.credly.com/users/manuel-vogel)\n\n⚙️ **Infrastructure as Code (IaC)**\nWith deep expertise in **AWS CDK** and **Terraform**, I ensure your infrastructure is automated, maintainable, and scalable.\n\n📦 **DevOps Expertise**\nFrom CI/CD pipelines with **GitHub Actions** and **GitLab CI** to container orchestration **Kubernetes** and others, I deliver workflows that are smooth and efficient.\n\n🌐 **Hands-On Experience**\nWith over **7 years of AWS experience** and a decade in the tech world, I’ve delivered solutions for companies large and small. My open-source contributions showcase my commitment to transparency and innovation. Feel free to explore my [GitHub profile](https://github.com/mavogel)\n\n---\n\n### 💼 Let’s Build Something Great Together\n\nI know that choosing the right partner is critical to your success. When you work with me, you’re not just contracting an engineer – you’re gaining a trusted advisor and hands-on expert who cares about your business as much as you do.\n\n✔️ **Direct Collaboration**: No middlemen or red tape – you work with me directly.\n✔️ **Transparent Process**: Expect open communication, clear timelines, and visible results.\n✔️ **Real Value**: My solutions focus on delivering measurable impact for your business.\n\n\n<a href=\"https://tinyurl.com/mvc-15min\"><img alt=\"Schedule your call\" src=\"https://img.shields.io/badge/schedule%20your%20call-success.svg?style=for-the-badge\"/></a>\n\n---\n\n## 🙌 Acknowledgements\n\nBig shoutout to the amazing team behind [Projen](https://github.com/projen/projen)!\nTheir groundbreaking work simplifies cloud infrastructure projects and inspires us every day. 💡\n\n## Author\n\n[Manuel Vogel](https://manuel-vogel.de/about/)\n\n[![](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/manuel-vogel)\n[![](https://img.shields.io/badge/GitHub-2b3137?style=for-the-badge&logo=github&logoColor=white)](https://github.com/mavogel)"
4105
+ "markdown": "![Source](https://img.shields.io/github/stars/MV-Consulting/cdk-vscode-server?logo=github&label=GitHub%20Stars)\n[![Build Status](https://github.com/MV-Consulting/cdk-vscode-server/actions/workflows/build.yml/badge.svg)](https://github.com/MV-Consulting/cdk-vscode-server/actions/workflows/build.yml)\n[![ESLint Code Formatting](https://img.shields.io/badge/code_style-eslint-brightgreen.svg)](https://eslint.org)\n[![Latest release](https://img.shields.io/github/release/MV-Consulting/cdk-vscode-server.svg)](https://github.com/MV-Consulting/cdk-vscode-server/releases)\n![GitHub](https://img.shields.io/github/license/MV-Consulting/cdk-vscode-server)\n[![npm](https://img.shields.io/npm/dt/@mavogel/cdk-vscode-server?label=npm&color=orange)](https://www.npmjs.com/package/@mavogel/cdk-vscode-server)\n[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@mavogel/cdk-vscode-server)\n\n# cdk-vscode-server\n\nRunning your dev IDE vscode on AWS for development and workshop purposes.\n\n> [!Note]\n> This construct is designed for workshop purposes and does not fulfill all security and authentication best practices.\n\n![EXPERIMENTAL](https://img.shields.io/badge/stability-experimantal-orange?style=for-the-badge)**<br>This is an early version of the package. The API will change while I\nwe implement new features. Therefore make sure you use an exact version in your `package.json` before it reaches 1.0.0.**\n\n## Table of Contents\n\n- [Features](#features)\n- [Usage](#usage)\n - [Standard](#Standard)\n - [Pre-populate with Git Repository](#pre-populate-with-git-repository)\n - [Custom Domain Configuration](#custom-domain-configuration)\n - [Auto-Stop Configuration](#auto-stop-configuration)\n- [Solution Design](#solution-design)\n- [Inspiration](#inspiration)\n\n## Features\n\n- ⚡ **Quick Setup**: Spin up and configure your [vscode](https://code.visualstudio.com/) server in under 10 minutes in your AWS account\n- 📏 **Best Practice Setup**: Set up with [projen](https://projen.io/) and a [single configuration file](./.projenrc.ts) to keep your changes centralized.\n- 🤹‍♂️ **Pre-installed packages**: Besides the [vscode](https://code.visualstudio.com/) server, other tools and software packages such as `git`, `docker`, `awscli` `nodejs` and `python` are pre-installed on the EC2 instance.\n- 🌐 **Custom Domain Support**: Use your own domain name with automatic ACM certificate creation and Route53 DNS configuration, or bring your existing certificate.\n- 💰 **Auto-Stop**: Automatically stop EC2 instances after inactivity with Elastic IP retention - save up to 75% on costs for development environments.\n- 🏗️ **Extensibility**: Pass in properties to the construct, which start with `additional*`. They allow you to extend the configuration to your needs. There are more to come...\n\n## Usage\nActually we supported 2 modes:\n\n### Standard\nThe following steps get you started:\n\n1. Create a new `awscdk-app` via\n```bash\nnpx projen new awscdk-app-ts --package-manager=npm\n```\n3. Add `@mavogel/cdk-vscode-server` as a dependency to your project in the `.projenrc.ts` file\n4. Run `npx projen` to install it\n5. Add the following to the `src/main.ts` file:\n```ts\nimport { App, Stack, StackProps } from 'aws-cdk-lib';\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { Construct } from 'constructs';\nimport {\n LinuxArchitectureType,\n LinuxFlavorType,\n VSCodeServer\n} from '@mavogel/cdk-vscode-server';\n\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n new VSCodeServer(this, 'vscode', {\n // for example (or simply use the defaults by not setting the properties)\n instanceVolumeSize: 8,\n instanceClass: ec2.InstanceClass.M7G,\n instanceSize: ec2.InstanceSize.LARGE,\n instanceOperatingSystem: LinuxFlavorType.UBUNTU_22,\n instanceCpuArchitecture: LinuxArchitectureType.ARM,\n\n // 👇🏽 or if you want to give the InstanceRole more permissions\n additionalInstanceRolePolicies: [\n new iam.PolicyStatement({\n effect: iam.Effect.ALLOW,\n actions: [\n 'codebuild:*',\n ],\n resources: [\n `arn:aws:codebuild:*:${Stack.of(this).account}:*/*`,\n ],\n }),\n ]\n\n // and more... 💡\n });\n }\n}\n\nconst env = {\n account: '123456789912',\n region: 'eu-central-1',\n};\n\nconst app = new App();\nnew MyStack(app, 'vscode-server', { env });\napp.synth();\n```\n\nand deploy it\n```bash\nnpx projen build\nnpx projen deploy\n```\n\nwith the output\n```console\n✨ Deployment time: 509.87s\n\nOutputs:\ndev.vscodedomainName6729AA39 = https://d1foo65bar4baz.cloudfront.net/?folder=/Workshop\ndev.vscodepassword64FBCA12 = foobarbaz\n```\n\nSee the [examples](./examples) folder for more inspiration.\n\n### Pre-populate with Git Repository\n\nClone a git repository into the VS Code Server's home folder during instance setup - perfect for workshops or development environments with starter code:\n\n```ts\nnew VSCodeServer(this, 'vscode', {\n // Clone a git repository into the home folder\n repoUrl: 'https://github.com/aws-samples/my-workshop-repo.git',\n\n // Optional: customize the home folder path (default: /Workshop)\n homeFolder: '/MyWorkshop',\n\n // Optional: specify VS Code user (default: vscode-user)\n vscodeUser: 'workshop-user',\n});\n```\n\n**What happens:**\n1. During instance setup, the specified git repository is cloned into the user's home folder\n2. VS Code Server opens with the repository already loaded and ready to use\n3. Participants can start coding immediately without manual git clone steps\n\n**Use cases:**\n- Workshop environments with pre-configured starter code\n- Development environments with boilerplate projects\n- Training sessions with example applications\n- Code review sessions with pre-loaded repositories\n\n**Repository requirements:**\n- Must be publicly accessible (no authentication required)\n- HTTPS URLs only (SSH git URLs are not supported)\n- Repository will be cloned using `git clone` during instance initialization\n\nFor complete examples, see [examples/](./examples).\n\n### Custom Domain Configuration\n\nYou can configure your VS Code Server with a custom domain name instead of using the default CloudFront domain. The construct supports three different configuration options:\n\n#### Option 1: Auto-create Certificate with DNS Validation\n```ts\nnew VSCodeServer(this, 'vscode', {\n domainName: 'vscode.example.com',\n hostedZoneId: 'Z123EXAMPLE456', // optional - will auto-discover if not provided\n autoCreateCertificate: true,\n});\n```\n\nThis will:\n- Create an ACM certificate in us-east-1 (required for CloudFront)\n- Validate the certificate using DNS validation\n- Create a Route53 A record pointing to the CloudFront distribution\n- Configure the CloudFront distribution with the custom domain\n\n#### Option 2: Use Existing Certificate\n```ts\nnew VSCodeServer(this, 'vscode', {\n domainName: 'vscode.example.com',\n hostedZoneId: 'Z123EXAMPLE456',\n certificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012',\n});\n```\n\n**Requirements:**\n- Certificate must be in us-east-1 region\n- Certificate must be validated and ready to use\n- Certificate must include the domain name\n\n#### Option 3: Default (No Custom Domain)\n```ts\nnew VSCodeServer(this, 'vscode', {\n // No domain configuration - uses CloudFront default domain\n});\n```\n\nFor complete examples, see [examples/custom-domain/main.ts](./examples/custom-domain/main.ts).\n\n6. Then open the domain name in your favorite browser and you'd see the following login screen:\n![vscode-server-ui-login](docs/img/vscode-server-ui-login-min.png)\n\n7. After entering the password, you are logged into VSCode and can start coding :tada:\n\n![vscode-server-ui](docs/img/vscode-server-ui-min.png)\n\n> [!Important]\n> There are issues with copy pasting into the VSCode terminal within the Firefox browser (2025-01-12)\n\n### Auto-Stop Configuration\n\nSave up to 75% on costs by automatically stopping EC2 instances when idle:\n\n```ts\nnew VSCodeServer(this, 'vscode', {\n enableAutoStop: true, // Enable auto-stop feature\n idleTimeoutMinutes: 30, // Stop after 30 minutes of no activity (default)\n idleCheckIntervalMinutes: 5, // Check for idle activity every 5 minutes (default)\n});\n```\n\n**How it works:**\n1. **Idle Detection**: Monitors CloudFront request metrics at configured intervals (default: every 5 minutes)\n2. **Auto-Stop**: Stops the EC2 instance after the configured idle timeout when no requests are detected\n3. **Static IP**: Allocates an Elastic IP to maintain a consistent public IP address across stop/start cycles\n4. **Manual Resume**: Users can manually start the instance via AWS Console or CLI when needed\n\n**Cost Savings Example:**\n- **Without auto-stop**: m7g.xlarge running 24/7 = ~$120/month\n- **With auto-stop** (8 hours/day, 5 days/week): ~$30/month\n- **Savings**: ~$90/month (75% reduction)\n\n**Additional costs:**\n- Elastic IP (allocated): ~$3.65/month\n- Lambda function (IdleMonitor): ~$0.10/month\n- EventBridge rule: Negligible\n- **Net savings**: ~$86/month per instance\n\n**Architecture Components:**\n- Elastic IP for consistent public addressing\n- EventBridge rule triggering idle monitoring at configured intervals\n- IdleMonitor Lambda function checking CloudWatch metrics for request activity\n- IdleMonitorEnabler custom resource ensuring monitoring only starts after installation completes\n- CloudWatch metrics from CloudFront distribution\n\n**Integration Testing:**\n\nThe stop-on-idle functionality includes comprehensive integration tests (`integ-tests/integ.stop-on-idle.ts`) that verify the complete workflow:\n\n1. **Phase 1 - Verify Auto-Stop**: Waits for the instance to automatically stop after the configured idle timeout\n2. **Phase 2 - Disable IdleMonitor**: Disables the EventBridge rule to prevent the instance from being stopped again during testing\n3. **Phase 3 - Start Instance**: Starts the stopped instance and waits for it to reach the running state\n4. **Phase 4 - Verify Login**: Confirms that VS Code Server is accessible through CloudFront after the instance has been restarted\n\nThis 4-phase test ensures that:\n- Idle detection works correctly based on CloudWatch metrics\n- Instance stops automatically when no activity is detected\n- Instance can be successfully restarted after being stopped\n- VS Code Server remains accessible after stop/start cycles\n- Elastic IP maintains connectivity across state changes\n\nRun integration tests with:\n```bash\nnpm run integ-test\n```\n\n## Solution Design\n\n<details>\n <summary>... if you're curious about click here for the details</summary>\n\n![vscode-server-solution-design](docs/img/vscode-server.drawio-min.png)\n\n</details>\n\n## Inspiration\nThis project was created based on the following inspiration\n\n- [vscode-on-ec2-for-prototyping](https://github.com/aws-samples/vscode-on-ec2-for-prototyping): as baseline, which unfortunately was outdated\n- [aws-terraform-dev-container](https://github.com/awslabs/aws-terraform-dev-container): as baseline for terraform, but unfortunately also outdated\n- [java-on-aws-workshop-ide-only.yaml](https://github.com/aws-samples/java-on-aws/blob/main/labs/unicorn-store/infrastructure/cfn/java-on-aws-workshop-ide-only.yaml): an already synthesized cloudformation stack, which used mostly python as the custom resources\n- [fleet-workshop-team-stack-self.json](https://static.us-east-1.prod.workshops.aws/public/cc4aa67e-5b7a-4df1-abf7-c42502899a25/assets/fleet-workshop-team-stack-self.json): also an already synthesized cloudformation stack, which did much more as I currently implemented here.\n- [eks-workshop-vscode-cfn.yaml](https://github.com/aws-samples/eks-workshop-v2/blob/main/lab/cfn/eks-workshop-vscode-cfn.yaml): another great baseline\n\n\n## 🚀 Unlock the Full Potential of Your AWS Cloud Infrastructure\n\nHi, I’m Manuel, an AWS expert passionate about empowering businesses with **scalable, resilient, and cost-optimized cloud solutions**. With **MV Consulting**, I specialize in crafting **tailored AWS architectures** and **DevOps-driven workflows** that not only meet your current needs but grow with you.\n\n---\n\n### 🌟 Why Work With Me?\n\n✔️ **Tailored AWS Solutions:** Every business is unique, so I design custom solutions that fit your goals and challenges.\n✔️ **Well-Architected Designs:** From scalability to security, my solutions align with AWS Well-Architected Framework.\n✔️ **Cloud-Native Focus:** I specialize in modern, cloud-native systems that embrace the full potential of AWS.\n✔️ **Business-Driven Tech:** Technology should serve your business, not the other way around.\n\n---\n\n### 🛠 What I Bring to the Table\n\n🔑 **12x AWS Certifications**\nI’m **AWS Certified Solutions Architect and DevOps – Professional** and hold numerous additional certifications, so you can trust I’ll bring industry best practices to your projects. Feel free to explose by [badges](https://www.credly.com/users/manuel-vogel)\n\n⚙️ **Infrastructure as Code (IaC)**\nWith deep expertise in **AWS CDK** and **Terraform**, I ensure your infrastructure is automated, maintainable, and scalable.\n\n📦 **DevOps Expertise**\nFrom CI/CD pipelines with **GitHub Actions** and **GitLab CI** to container orchestration **Kubernetes** and others, I deliver workflows that are smooth and efficient.\n\n🌐 **Hands-On Experience**\nWith over **7 years of AWS experience** and a decade in the tech world, I’ve delivered solutions for companies large and small. My open-source contributions showcase my commitment to transparency and innovation. Feel free to explore my [GitHub profile](https://github.com/mavogel)\n\n---\n\n### 💼 Let’s Build Something Great Together\n\nI know that choosing the right partner is critical to your success. When you work with me, you’re not just contracting an engineer – you’re gaining a trusted advisor and hands-on expert who cares about your business as much as you do.\n\n✔️ **Direct Collaboration**: No middlemen or red tape – you work with me directly.\n✔️ **Transparent Process**: Expect open communication, clear timelines, and visible results.\n✔️ **Real Value**: My solutions focus on delivering measurable impact for your business.\n\n\n<a href=\"https://tinyurl.com/mvc-15min\"><img alt=\"Schedule your call\" src=\"https://img.shields.io/badge/schedule%20your%20call-success.svg?style=for-the-badge\"/></a>\n\n---\n\n## 🙌 Acknowledgements\n\nBig shoutout to the amazing team behind [Projen](https://github.com/projen/projen)!\nTheir groundbreaking work simplifies cloud infrastructure projects and inspires us every day. 💡\n\n## Author\n\n[Manuel Vogel](https://manuel-vogel.de/about/)\n\n[![](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/manuel-vogel)\n[![](https://img.shields.io/badge/GitHub-2b3137?style=for-the-badge&logo=github&logoColor=white)](https://github.com/mavogel)"
4105
4106
  },
4106
4107
  "repository": {
4107
4108
  "type": "git",
@@ -4308,7 +4309,7 @@
4308
4309
  "kind": "enum",
4309
4310
  "locationInModule": {
4310
4311
  "filename": "src/vscode-server.ts",
4311
- "line": 219
4312
+ "line": 264
4312
4313
  },
4313
4314
  "members": [
4314
4315
  {
@@ -4339,7 +4340,7 @@
4339
4340
  "kind": "enum",
4340
4341
  "locationInModule": {
4341
4342
  "filename": "src/vscode-server.ts",
4342
- "line": 199
4343
+ "line": 244
4343
4344
  },
4344
4345
  "members": [
4345
4346
  {
@@ -4367,148 +4368,6 @@
4367
4368
  "name": "LinuxFlavorType",
4368
4369
  "symbolId": "src/vscode-server:LinuxFlavorType"
4369
4370
  },
4370
- "@mavogel/cdk-vscode-server.StatusCheckApi": {
4371
- "assembly": "@mavogel/cdk-vscode-server",
4372
- "base": "constructs.Construct",
4373
- "docs": {
4374
- "stability": "experimental",
4375
- "summary": "API Gateway endpoint for checking instance status, used by resume page for polling."
4376
- },
4377
- "fqn": "@mavogel/cdk-vscode-server.StatusCheckApi",
4378
- "initializer": {
4379
- "docs": {
4380
- "stability": "experimental"
4381
- },
4382
- "locationInModule": {
4383
- "filename": "src/status-check/status-check.ts",
4384
- "line": 42
4385
- },
4386
- "parameters": [
4387
- {
4388
- "name": "scope",
4389
- "type": {
4390
- "fqn": "constructs.Construct"
4391
- }
4392
- },
4393
- {
4394
- "name": "id",
4395
- "type": {
4396
- "primitive": "string"
4397
- }
4398
- },
4399
- {
4400
- "name": "props",
4401
- "type": {
4402
- "fqn": "@mavogel/cdk-vscode-server.StatusCheckApiProps"
4403
- }
4404
- }
4405
- ]
4406
- },
4407
- "kind": "class",
4408
- "locationInModule": {
4409
- "filename": "src/status-check/status-check.ts",
4410
- "line": 28
4411
- },
4412
- "name": "StatusCheckApi",
4413
- "properties": [
4414
- {
4415
- "docs": {
4416
- "stability": "experimental",
4417
- "summary": "The API Gateway REST API."
4418
- },
4419
- "immutable": true,
4420
- "locationInModule": {
4421
- "filename": "src/status-check/status-check.ts",
4422
- "line": 32
4423
- },
4424
- "name": "api",
4425
- "type": {
4426
- "fqn": "aws-cdk-lib.aws_apigateway.RestApi"
4427
- }
4428
- },
4429
- {
4430
- "docs": {
4431
- "stability": "experimental",
4432
- "summary": "The URL of the status check API endpoint."
4433
- },
4434
- "immutable": true,
4435
- "locationInModule": {
4436
- "filename": "src/status-check/status-check.ts",
4437
- "line": 36
4438
- },
4439
- "name": "apiUrl",
4440
- "type": {
4441
- "primitive": "string"
4442
- }
4443
- },
4444
- {
4445
- "docs": {
4446
- "stability": "experimental",
4447
- "summary": "The Lambda function that handles status check requests."
4448
- },
4449
- "immutable": true,
4450
- "locationInModule": {
4451
- "filename": "src/status-check/status-check.ts",
4452
- "line": 40
4453
- },
4454
- "name": "function",
4455
- "type": {
4456
- "fqn": "aws-cdk-lib.aws_lambda.Function"
4457
- }
4458
- }
4459
- ],
4460
- "symbolId": "src/status-check/status-check:StatusCheckApi"
4461
- },
4462
- "@mavogel/cdk-vscode-server.StatusCheckApiProps": {
4463
- "assembly": "@mavogel/cdk-vscode-server",
4464
- "datatype": true,
4465
- "docs": {
4466
- "stability": "experimental",
4467
- "summary": "Props for StatusCheckApi construct."
4468
- },
4469
- "fqn": "@mavogel/cdk-vscode-server.StatusCheckApiProps",
4470
- "kind": "interface",
4471
- "locationInModule": {
4472
- "filename": "src/status-check/status-check.ts",
4473
- "line": 14
4474
- },
4475
- "name": "StatusCheckApiProps",
4476
- "properties": [
4477
- {
4478
- "abstract": true,
4479
- "docs": {
4480
- "stability": "experimental",
4481
- "summary": "The EC2 instance to check status for."
4482
- },
4483
- "immutable": true,
4484
- "locationInModule": {
4485
- "filename": "src/status-check/status-check.ts",
4486
- "line": 18
4487
- },
4488
- "name": "instance",
4489
- "type": {
4490
- "fqn": "aws-cdk-lib.aws_ec2.IInstance"
4491
- }
4492
- },
4493
- {
4494
- "abstract": true,
4495
- "docs": {
4496
- "stability": "experimental",
4497
- "summary": "DynamoDB table for tracking instance state."
4498
- },
4499
- "immutable": true,
4500
- "locationInModule": {
4501
- "filename": "src/status-check/status-check.ts",
4502
- "line": 22
4503
- },
4504
- "name": "stateTable",
4505
- "type": {
4506
- "fqn": "aws-cdk-lib.aws_dynamodb.ITable"
4507
- }
4508
- }
4509
- ],
4510
- "symbolId": "src/status-check/status-check:StatusCheckApiProps"
4511
- },
4512
4371
  "@mavogel/cdk-vscode-server.VSCodeServer": {
4513
4372
  "assembly": "@mavogel/cdk-vscode-server",
4514
4373
  "base": "constructs.Construct",
@@ -4523,7 +4382,7 @@
4523
4382
  },
4524
4383
  "locationInModule": {
4525
4384
  "filename": "src/vscode-server.ts",
4526
- "line": 255
4385
+ "line": 300
4527
4386
  },
4528
4387
  "parameters": [
4529
4388
  {
@@ -4550,7 +4409,7 @@
4550
4409
  "kind": "class",
4551
4410
  "locationInModule": {
4552
4411
  "filename": "src/vscode-server.ts",
4553
- "line": 234
4412
+ "line": 279
4554
4413
  },
4555
4414
  "name": "VSCodeServer",
4556
4415
  "properties": [
@@ -4562,7 +4421,7 @@
4562
4421
  "immutable": true,
4563
4422
  "locationInModule": {
4564
4423
  "filename": "src/vscode-server.ts",
4565
- "line": 238
4424
+ "line": 283
4566
4425
  },
4567
4426
  "name": "domainName",
4568
4427
  "type": {
@@ -4577,7 +4436,7 @@
4577
4436
  "immutable": true,
4578
4437
  "locationInModule": {
4579
4438
  "filename": "src/vscode-server.ts",
4580
- "line": 248
4439
+ "line": 293
4581
4440
  },
4582
4441
  "name": "instance",
4583
4442
  "type": {
@@ -4592,7 +4451,7 @@
4592
4451
  "immutable": true,
4593
4452
  "locationInModule": {
4594
4453
  "filename": "src/vscode-server.ts",
4595
- "line": 243
4454
+ "line": 288
4596
4455
  },
4597
4456
  "name": "password",
4598
4457
  "type": {
@@ -4607,7 +4466,7 @@
4607
4466
  "immutable": true,
4608
4467
  "locationInModule": {
4609
4468
  "filename": "src/vscode-server.ts",
4610
- "line": 253
4469
+ "line": 298
4611
4470
  },
4612
4471
  "name": "idleMonitor",
4613
4472
  "optional": true,
@@ -4629,7 +4488,7 @@
4629
4488
  "kind": "interface",
4630
4489
  "locationInModule": {
4631
4490
  "filename": "src/vscode-server.ts",
4632
- "line": 29
4491
+ "line": 30
4633
4492
  },
4634
4493
  "name": "VSCodeServerProps",
4635
4494
  "properties": [
@@ -4643,7 +4502,7 @@
4643
4502
  "immutable": true,
4644
4503
  "locationInModule": {
4645
4504
  "filename": "src/vscode-server.ts",
4646
- "line": 112
4505
+ "line": 113
4647
4506
  },
4648
4507
  "name": "additionalInstanceRolePolicies",
4649
4508
  "optional": true,
@@ -4666,7 +4525,7 @@
4666
4525
  "immutable": true,
4667
4526
  "locationInModule": {
4668
4527
  "filename": "src/vscode-server.ts",
4669
- "line": 119
4528
+ "line": 120
4670
4529
  },
4671
4530
  "name": "additionalTags",
4672
4531
  "optional": true,
@@ -4679,6 +4538,26 @@
4679
4538
  }
4680
4539
  }
4681
4540
  },
4541
+ {
4542
+ "abstract": true,
4543
+ "docs": {
4544
+ "default": "- no assets downloaded",
4545
+ "example": "'my-workshop-bucket/assets/workshop-materials.zip'",
4546
+ "remarks": "The zip contents will be extracted to the user's home folder and committed to git.\nUse this to provide workshop materials, sample data, or configuration files.",
4547
+ "stability": "experimental",
4548
+ "summary": "S3 path to a zip file containing assets to extract into the home folder."
4549
+ },
4550
+ "immutable": true,
4551
+ "locationInModule": {
4552
+ "filename": "src/vscode-server.ts",
4553
+ "line": 216
4554
+ },
4555
+ "name": "assetZipS3Path",
4556
+ "optional": true,
4557
+ "type": {
4558
+ "primitive": "string"
4559
+ }
4560
+ },
4682
4561
  {
4683
4562
  "abstract": true,
4684
4563
  "docs": {
@@ -4689,7 +4568,7 @@
4689
4568
  "immutable": true,
4690
4569
  "locationInModule": {
4691
4570
  "filename": "src/vscode-server.ts",
4692
- "line": 156
4571
+ "line": 157
4693
4572
  },
4694
4573
  "name": "autoCreateCertificate",
4695
4574
  "optional": true,
@@ -4697,6 +4576,26 @@
4697
4576
  "primitive": "boolean"
4698
4577
  }
4699
4578
  },
4579
+ {
4580
+ "abstract": true,
4581
+ "docs": {
4582
+ "default": "- no branches created",
4583
+ "example": "'my-workshop-bucket/branches/lab-branches.zip' (containing folders: step-1/, step-2/, solution/)",
4584
+ "remarks": "Each top-level folder in the zip becomes a separate git branch with that folder's contents.\nIdeal for creating step-by-step workshop branches (e.g., step-1, step-2, solution).",
4585
+ "stability": "experimental",
4586
+ "summary": "S3 path to a zip file containing git branches to create in the home folder repository."
4587
+ },
4588
+ "immutable": true,
4589
+ "locationInModule": {
4590
+ "filename": "src/vscode-server.ts",
4591
+ "line": 227
4592
+ },
4593
+ "name": "branchZipS3Path",
4594
+ "optional": true,
4595
+ "type": {
4596
+ "primitive": "string"
4597
+ }
4598
+ },
4700
4599
  {
4701
4600
  "abstract": true,
4702
4601
  "docs": {
@@ -4707,7 +4606,7 @@
4707
4606
  "immutable": true,
4708
4607
  "locationInModule": {
4709
4608
  "filename": "src/vscode-server.ts",
4710
- "line": 146
4609
+ "line": 147
4711
4610
  },
4712
4611
  "name": "certificateArn",
4713
4612
  "optional": true,
@@ -4725,7 +4624,7 @@
4725
4624
  "immutable": true,
4726
4625
  "locationInModule": {
4727
4626
  "filename": "src/vscode-server.ts",
4728
- "line": 98
4627
+ "line": 99
4729
4628
  },
4730
4629
  "name": "devServerBasePath",
4731
4630
  "optional": true,
@@ -4743,7 +4642,7 @@
4743
4642
  "immutable": true,
4744
4643
  "locationInModule": {
4745
4644
  "filename": "src/vscode-server.ts",
4746
- "line": 105
4645
+ "line": 106
4747
4646
  },
4748
4647
  "name": "devServerPort",
4749
4648
  "optional": true,
@@ -4761,7 +4660,7 @@
4761
4660
  "immutable": true,
4762
4661
  "locationInModule": {
4763
4662
  "filename": "src/vscode-server.ts",
4764
- "line": 128
4663
+ "line": 129
4765
4664
  },
4766
4665
  "name": "domainName",
4767
4666
  "optional": true,
@@ -4779,7 +4678,7 @@
4779
4678
  "immutable": true,
4780
4679
  "locationInModule": {
4781
4680
  "filename": "src/vscode-server.ts",
4782
- "line": 164
4681
+ "line": 165
4783
4682
  },
4784
4683
  "name": "enableAutoStop",
4785
4684
  "optional": true,
@@ -4787,6 +4686,26 @@
4787
4686
  "primitive": "boolean"
4788
4687
  }
4789
4688
  },
4689
+ {
4690
+ "abstract": true,
4691
+ "docs": {
4692
+ "default": "- no folders created",
4693
+ "example": "'my-workshop-bucket/folders/workshop-projects.zip' (containing folders: frontend/, backend/, infrastructure/)",
4694
+ "remarks": "Each top-level folder in the zip becomes a separate subfolder in the parent directory,\ninitialized as its own git repository. Useful for multi-project workshops.",
4695
+ "stability": "experimental",
4696
+ "summary": "S3 path to a zip file containing multiple folders to create as separate git repositories."
4697
+ },
4698
+ "immutable": true,
4699
+ "locationInModule": {
4700
+ "filename": "src/vscode-server.ts",
4701
+ "line": 238
4702
+ },
4703
+ "name": "folderZipS3Path",
4704
+ "optional": true,
4705
+ "type": {
4706
+ "primitive": "string"
4707
+ }
4708
+ },
4790
4709
  {
4791
4710
  "abstract": true,
4792
4711
  "docs": {
@@ -4797,7 +4716,7 @@
4797
4716
  "immutable": true,
4798
4717
  "locationInModule": {
4799
4718
  "filename": "src/vscode-server.ts",
4800
- "line": 91
4719
+ "line": 92
4801
4720
  },
4802
4721
  "name": "homeFolder",
4803
4722
  "optional": true,
@@ -4815,7 +4734,7 @@
4815
4734
  "immutable": true,
4816
4735
  "locationInModule": {
4817
4736
  "filename": "src/vscode-server.ts",
4818
- "line": 137
4737
+ "line": 138
4819
4738
  },
4820
4739
  "name": "hostedZoneId",
4821
4740
  "optional": true,
@@ -4833,7 +4752,7 @@
4833
4752
  "immutable": true,
4834
4753
  "locationInModule": {
4835
4754
  "filename": "src/vscode-server.ts",
4836
- "line": 180
4755
+ "line": 181
4837
4756
  },
4838
4757
  "name": "idleCheckIntervalMinutes",
4839
4758
  "optional": true,
@@ -4851,7 +4770,7 @@
4851
4770
  "immutable": true,
4852
4771
  "locationInModule": {
4853
4772
  "filename": "src/vscode-server.ts",
4854
- "line": 172
4773
+ "line": 173
4855
4774
  },
4856
4775
  "name": "idleTimeoutMinutes",
4857
4776
  "optional": true,
@@ -4869,7 +4788,7 @@
4869
4788
  "immutable": true,
4870
4789
  "locationInModule": {
4871
4790
  "filename": "src/vscode-server.ts",
4872
- "line": 63
4791
+ "line": 64
4873
4792
  },
4874
4793
  "name": "instanceClass",
4875
4794
  "optional": true,
@@ -4887,7 +4806,7 @@
4887
4806
  "immutable": true,
4888
4807
  "locationInModule": {
4889
4808
  "filename": "src/vscode-server.ts",
4890
- "line": 84
4809
+ "line": 85
4891
4810
  },
4892
4811
  "name": "instanceCpuArchitecture",
4893
4812
  "optional": true,
@@ -4905,7 +4824,7 @@
4905
4824
  "immutable": true,
4906
4825
  "locationInModule": {
4907
4826
  "filename": "src/vscode-server.ts",
4908
- "line": 49
4827
+ "line": 50
4909
4828
  },
4910
4829
  "name": "instanceName",
4911
4830
  "optional": true,
@@ -4923,7 +4842,7 @@
4923
4842
  "immutable": true,
4924
4843
  "locationInModule": {
4925
4844
  "filename": "src/vscode-server.ts",
4926
- "line": 77
4845
+ "line": 78
4927
4846
  },
4928
4847
  "name": "instanceOperatingSystem",
4929
4848
  "optional": true,
@@ -4941,7 +4860,7 @@
4941
4860
  "immutable": true,
4942
4861
  "locationInModule": {
4943
4862
  "filename": "src/vscode-server.ts",
4944
- "line": 70
4863
+ "line": 71
4945
4864
  },
4946
4865
  "name": "instanceSize",
4947
4866
  "optional": true,
@@ -4959,7 +4878,7 @@
4959
4878
  "immutable": true,
4960
4879
  "locationInModule": {
4961
4880
  "filename": "src/vscode-server.ts",
4962
- "line": 56
4881
+ "line": 57
4963
4882
  },
4964
4883
  "name": "instanceVolumeSize",
4965
4884
  "optional": true,
@@ -4967,6 +4886,26 @@
4967
4886
  "primitive": "number"
4968
4887
  }
4969
4888
  },
4889
+ {
4890
+ "abstract": true,
4891
+ "docs": {
4892
+ "default": "- no repo cloned",
4893
+ "example": "'https://github.com/aws-samples/my-workshop-repo.git'",
4894
+ "remarks": "If provided, the repository will be cloned into the user's home folder during instance setup.\nUseful for pre-populating workshop environments with starter code.",
4895
+ "stability": "experimental",
4896
+ "summary": "Remote git repository URL to clone into the home folder."
4897
+ },
4898
+ "immutable": true,
4899
+ "locationInModule": {
4900
+ "filename": "src/vscode-server.ts",
4901
+ "line": 205
4902
+ },
4903
+ "name": "repoUrl",
4904
+ "optional": true,
4905
+ "type": {
4906
+ "primitive": "string"
4907
+ }
4908
+ },
4970
4909
  {
4971
4910
  "abstract": true,
4972
4911
  "docs": {
@@ -4978,7 +4917,7 @@
4978
4917
  "immutable": true,
4979
4918
  "locationInModule": {
4980
4919
  "filename": "src/vscode-server.ts",
4981
- "line": 193
4920
+ "line": 194
4982
4921
  },
4983
4922
  "name": "skipStatusChecks",
4984
4923
  "optional": true,
@@ -4996,7 +4935,7 @@
4996
4935
  "immutable": true,
4997
4936
  "locationInModule": {
4998
4937
  "filename": "src/vscode-server.ts",
4999
- "line": 42
4938
+ "line": 43
5000
4939
  },
5001
4940
  "name": "vscodePassword",
5002
4941
  "optional": true,
@@ -5014,7 +4953,7 @@
5014
4953
  "immutable": true,
5015
4954
  "locationInModule": {
5016
4955
  "filename": "src/vscode-server.ts",
5017
- "line": 35
4956
+ "line": 36
5018
4957
  },
5019
4958
  "name": "vscodeUser",
5020
4959
  "optional": true,
@@ -5026,6 +4965,6 @@
5026
4965
  "symbolId": "src/vscode-server:VSCodeServerProps"
5027
4966
  }
5028
4967
  },
5029
- "version": "0.0.62",
5030
- "fingerprint": "1+df8tUT0cFwF1t1vLDJ0wk/WN2LVefQqmNYQkeSkL4="
4968
+ "version": "0.0.63",
4969
+ "fingerprint": "WvxdieugMWZqOIWa0lvMJ93ykF+/f8+uUocq/yMhBjA="
5031
4970
  }