@mavogel/cdk-vscode-server 0.0.60 β†’ 0.0.61

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 (55) hide show
  1. package/.claude/hooks/file_checker.sh +3 -0
  2. package/.jsii +453 -30
  3. package/API.md +514 -0
  4. package/README.md +57 -0
  5. package/assets/idle-monitor/idle-monitor.lambda/index.js +110 -0
  6. package/assets/status-check/status-check.lambda/index.js +123 -0
  7. package/examples/auto-stop/main.ts +75 -0
  8. package/integ-tests/functions/idle-test-handler.ts +178 -0
  9. package/integ-tests/functions/login-handler.ts +62 -33
  10. package/integ-tests/integ.al2023.ts.snapshot/read.13497.1.lock +1 -0
  11. package/integ-tests/integ.custom-domain.ts.snapshot/read.13497.1.lock +1 -0
  12. package/integ-tests/integ.stop-on-idle.ts +175 -0
  13. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegStopOnIdleFunctionalityDefaultTestDeployAssertEECF3FC0.assets.json +33 -0
  14. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegStopOnIdleFunctionalityDefaultTestDeployAssertEECF3FC0.template.json +692 -0
  15. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegTestStackStopOnIdle.assets.json +146 -0
  16. package/integ-tests/integ.stop-on-idle.ts.snapshot/IntegTestStackStopOnIdle.template.json +3077 -0
  17. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d/index.js +1 -0
  18. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.33da23274e25bd9f43638c5d83dad26e3931cbe78d462ffd9a9f565e948b4f5f.lambda/index.js +143 -0
  19. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.530055f7515b3f0a47900f5df37e729ba40ca977b2d07b952bdefa2b8f883f42.bundle/index.js +30676 -0
  20. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.781ab0ab74634cdaf61539ab208ab777829ef07097ac21f95b9e15a3b1eedc1b.lambda/index.js +57 -0
  21. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
  22. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/index.js +1 -0
  23. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.8dd4be31c5a6cd8750dc55c07c1e2f19596f8a27b032d02c18554ed44eabe065.lambda/index.js +110 -0
  24. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.9d043014be736e8162bcc7ec5590cc6d2ff24fd0d9c73a5c5d595151c5fdad00/index.js +1 -0
  25. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
  26. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/consts.js +1 -0
  27. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/framework.js +3 -0
  28. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/outbound.js +1 -0
  29. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
  30. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.d061a1ca61c6339fcb77bb6fc19194a60c96bb16531eaf1e4e733b50089512ca/index.js +118 -0
  31. package/integ-tests/integ.stop-on-idle.ts.snapshot/asset.efac30c7091c58fed492058fa6403c14f7e58aab8cf4fd595d838b8d5eeec2b9/index.js +6017 -0
  32. package/integ-tests/integ.stop-on-idle.ts.snapshot/integ.json +20 -0
  33. package/integ-tests/integ.stop-on-idle.ts.snapshot/manifest.json +1942 -0
  34. package/integ-tests/integ.stop-on-idle.ts.snapshot/tree.json +1 -0
  35. package/integ-tests/integ.ubuntu.ts.snapshot/read.13497.1.lock +1 -0
  36. package/lib/idle-monitor/idle-monitor-function.d.ts +13 -0
  37. package/lib/idle-monitor/idle-monitor-function.js +22 -0
  38. package/lib/idle-monitor/idle-monitor.d.ts +53 -0
  39. package/lib/idle-monitor/idle-monitor.js +84 -0
  40. package/lib/idle-monitor/idle-monitor.lambda.d.ts +2 -0
  41. package/lib/idle-monitor/idle-monitor.lambda.js +97 -0
  42. package/lib/index.d.ts +2 -0
  43. package/lib/index.js +3 -1
  44. package/lib/status-check/status-check-function.d.ts +13 -0
  45. package/lib/status-check/status-check-function.js +22 -0
  46. package/lib/status-check/status-check.d.ts +36 -0
  47. package/lib/status-check/status-check.js +109 -0
  48. package/lib/status-check/status-check.lambda.d.ts +2 -0
  49. package/lib/status-check/status-check.lambda.js +104 -0
  50. package/lib/vscode-server.d.ts +42 -0
  51. package/lib/vscode-server.js +51 -7
  52. package/mavogelcdkvscodeserver/go.mod +1 -1
  53. package/mavogelcdkvscodeserver/jsii/jsii.go +2 -2
  54. package/mavogelcdkvscodeserver/version +1 -1
  55. package/package.json +21 -16
package/.jsii CHANGED
@@ -4101,7 +4101,7 @@
4101
4101
  },
4102
4102
  "name": "@mavogel/cdk-vscode-server",
4103
4103
  "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- πŸ—οΈ **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## 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)"
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
4105
  },
4106
4106
  "repository": {
4107
4107
  "type": "git",
@@ -4109,9 +4109,6 @@
4109
4109
  },
4110
4110
  "schema": "jsii/0.10.0",
4111
4111
  "targets": {
4112
- "go": {
4113
- "moduleName": "github.com/MV-Consulting/cdk-vscode-server"
4114
- },
4115
4112
  "js": {
4116
4113
  "npm": "@mavogel/cdk-vscode-server"
4117
4114
  },
@@ -4121,6 +4118,186 @@
4121
4118
  }
4122
4119
  },
4123
4120
  "types": {
4121
+ "@mavogel/cdk-vscode-server.IdleMonitor": {
4122
+ "assembly": "@mavogel/cdk-vscode-server",
4123
+ "base": "constructs.Construct",
4124
+ "docs": {
4125
+ "stability": "experimental",
4126
+ "summary": "Construct that monitors CloudFront request metrics and stops the EC2 instance when idle."
4127
+ },
4128
+ "fqn": "@mavogel/cdk-vscode-server.IdleMonitor",
4129
+ "initializer": {
4130
+ "docs": {
4131
+ "stability": "experimental"
4132
+ },
4133
+ "locationInModule": {
4134
+ "filename": "src/idle-monitor/idle-monitor.ts",
4135
+ "line": 61
4136
+ },
4137
+ "parameters": [
4138
+ {
4139
+ "name": "scope",
4140
+ "type": {
4141
+ "fqn": "constructs.Construct"
4142
+ }
4143
+ },
4144
+ {
4145
+ "name": "id",
4146
+ "type": {
4147
+ "primitive": "string"
4148
+ }
4149
+ },
4150
+ {
4151
+ "name": "props",
4152
+ "type": {
4153
+ "fqn": "@mavogel/cdk-vscode-server.IdleMonitorProps"
4154
+ }
4155
+ }
4156
+ ]
4157
+ },
4158
+ "kind": "class",
4159
+ "locationInModule": {
4160
+ "filename": "src/idle-monitor/idle-monitor.ts",
4161
+ "line": 50
4162
+ },
4163
+ "name": "IdleMonitor",
4164
+ "properties": [
4165
+ {
4166
+ "docs": {
4167
+ "stability": "experimental",
4168
+ "summary": "The Lambda function that performs idle monitoring."
4169
+ },
4170
+ "immutable": true,
4171
+ "locationInModule": {
4172
+ "filename": "src/idle-monitor/idle-monitor.ts",
4173
+ "line": 54
4174
+ },
4175
+ "name": "function",
4176
+ "type": {
4177
+ "fqn": "aws-cdk-lib.aws_lambda.Function"
4178
+ }
4179
+ },
4180
+ {
4181
+ "docs": {
4182
+ "stability": "experimental",
4183
+ "summary": "The EventBridge rule that triggers idle monitoring checks."
4184
+ },
4185
+ "immutable": true,
4186
+ "locationInModule": {
4187
+ "filename": "src/idle-monitor/idle-monitor.ts",
4188
+ "line": 59
4189
+ },
4190
+ "name": "scheduleRule",
4191
+ "type": {
4192
+ "fqn": "aws-cdk-lib.aws_events.Rule"
4193
+ }
4194
+ }
4195
+ ],
4196
+ "symbolId": "src/idle-monitor/idle-monitor:IdleMonitor"
4197
+ },
4198
+ "@mavogel/cdk-vscode-server.IdleMonitorProps": {
4199
+ "assembly": "@mavogel/cdk-vscode-server",
4200
+ "datatype": true,
4201
+ "docs": {
4202
+ "stability": "experimental",
4203
+ "summary": "Props for IdleMonitor construct."
4204
+ },
4205
+ "fqn": "@mavogel/cdk-vscode-server.IdleMonitorProps",
4206
+ "kind": "interface",
4207
+ "locationInModule": {
4208
+ "filename": "src/idle-monitor/idle-monitor.ts",
4209
+ "line": 15
4210
+ },
4211
+ "name": "IdleMonitorProps",
4212
+ "properties": [
4213
+ {
4214
+ "abstract": true,
4215
+ "docs": {
4216
+ "stability": "experimental",
4217
+ "summary": "The CloudFront distribution to monitor for activity."
4218
+ },
4219
+ "immutable": true,
4220
+ "locationInModule": {
4221
+ "filename": "src/idle-monitor/idle-monitor.ts",
4222
+ "line": 23
4223
+ },
4224
+ "name": "distribution",
4225
+ "type": {
4226
+ "fqn": "aws-cdk-lib.aws_cloudfront.IDistribution"
4227
+ }
4228
+ },
4229
+ {
4230
+ "abstract": true,
4231
+ "docs": {
4232
+ "stability": "experimental",
4233
+ "summary": "Number of minutes of inactivity before stopping the instance."
4234
+ },
4235
+ "immutable": true,
4236
+ "locationInModule": {
4237
+ "filename": "src/idle-monitor/idle-monitor.ts",
4238
+ "line": 27
4239
+ },
4240
+ "name": "idleTimeoutMinutes",
4241
+ "type": {
4242
+ "primitive": "number"
4243
+ }
4244
+ },
4245
+ {
4246
+ "abstract": true,
4247
+ "docs": {
4248
+ "stability": "experimental",
4249
+ "summary": "The EC2 instance to monitor."
4250
+ },
4251
+ "immutable": true,
4252
+ "locationInModule": {
4253
+ "filename": "src/idle-monitor/idle-monitor.ts",
4254
+ "line": 19
4255
+ },
4256
+ "name": "instance",
4257
+ "type": {
4258
+ "fqn": "aws-cdk-lib.aws_ec2.IInstance"
4259
+ }
4260
+ },
4261
+ {
4262
+ "abstract": true,
4263
+ "docs": {
4264
+ "default": "5 - Check every 5 minutes",
4265
+ "stability": "experimental",
4266
+ "summary": "How often to check for idle activity (in minutes)."
4267
+ },
4268
+ "immutable": true,
4269
+ "locationInModule": {
4270
+ "filename": "src/idle-monitor/idle-monitor.ts",
4271
+ "line": 32
4272
+ },
4273
+ "name": "checkIntervalMinutes",
4274
+ "optional": true,
4275
+ "type": {
4276
+ "primitive": "number"
4277
+ }
4278
+ },
4279
+ {
4280
+ "abstract": true,
4281
+ "docs": {
4282
+ "default": "false",
4283
+ "remarks": "WARNING: For testing only - in production, you should wait for status checks\nto pass before stopping instances",
4284
+ "stability": "experimental",
4285
+ "summary": "Skip instance status checks before stopping When true, IdleMonitor will stop idle instances even if status checks haven't passed This is useful for integration tests where status check initialization time exceeds test timeout limits."
4286
+ },
4287
+ "immutable": true,
4288
+ "locationInModule": {
4289
+ "filename": "src/idle-monitor/idle-monitor.ts",
4290
+ "line": 44
4291
+ },
4292
+ "name": "skipStatusChecks",
4293
+ "optional": true,
4294
+ "type": {
4295
+ "primitive": "boolean"
4296
+ }
4297
+ }
4298
+ ],
4299
+ "symbolId": "src/idle-monitor/idle-monitor:IdleMonitorProps"
4300
+ },
4124
4301
  "@mavogel/cdk-vscode-server.LinuxArchitectureType": {
4125
4302
  "assembly": "@mavogel/cdk-vscode-server",
4126
4303
  "docs": {
@@ -4131,7 +4308,7 @@
4131
4308
  "kind": "enum",
4132
4309
  "locationInModule": {
4133
4310
  "filename": "src/vscode-server.ts",
4134
- "line": 180
4311
+ "line": 219
4135
4312
  },
4136
4313
  "members": [
4137
4314
  {
@@ -4162,7 +4339,7 @@
4162
4339
  "kind": "enum",
4163
4340
  "locationInModule": {
4164
4341
  "filename": "src/vscode-server.ts",
4165
- "line": 160
4342
+ "line": 199
4166
4343
  },
4167
4344
  "members": [
4168
4345
  {
@@ -4190,6 +4367,148 @@
4190
4367
  "name": "LinuxFlavorType",
4191
4368
  "symbolId": "src/vscode-server:LinuxFlavorType"
4192
4369
  },
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
+ },
4193
4512
  "@mavogel/cdk-vscode-server.VSCodeServer": {
4194
4513
  "assembly": "@mavogel/cdk-vscode-server",
4195
4514
  "base": "constructs.Construct",
@@ -4204,7 +4523,7 @@
4204
4523
  },
4205
4524
  "locationInModule": {
4206
4525
  "filename": "src/vscode-server.ts",
4207
- "line": 206
4526
+ "line": 255
4208
4527
  },
4209
4528
  "parameters": [
4210
4529
  {
@@ -4231,7 +4550,7 @@
4231
4550
  "kind": "class",
4232
4551
  "locationInModule": {
4233
4552
  "filename": "src/vscode-server.ts",
4234
- "line": 195
4553
+ "line": 234
4235
4554
  },
4236
4555
  "name": "VSCodeServer",
4237
4556
  "properties": [
@@ -4243,13 +4562,28 @@
4243
4562
  "immutable": true,
4244
4563
  "locationInModule": {
4245
4564
  "filename": "src/vscode-server.ts",
4246
- "line": 199
4565
+ "line": 238
4247
4566
  },
4248
4567
  "name": "domainName",
4249
4568
  "type": {
4250
4569
  "primitive": "string"
4251
4570
  }
4252
4571
  },
4572
+ {
4573
+ "docs": {
4574
+ "stability": "experimental",
4575
+ "summary": "The EC2 instance running VS Code Server."
4576
+ },
4577
+ "immutable": true,
4578
+ "locationInModule": {
4579
+ "filename": "src/vscode-server.ts",
4580
+ "line": 248
4581
+ },
4582
+ "name": "instance",
4583
+ "type": {
4584
+ "fqn": "aws-cdk-lib.aws_ec2.IInstance"
4585
+ }
4586
+ },
4253
4587
  {
4254
4588
  "docs": {
4255
4589
  "stability": "experimental",
@@ -4258,12 +4592,28 @@
4258
4592
  "immutable": true,
4259
4593
  "locationInModule": {
4260
4594
  "filename": "src/vscode-server.ts",
4261
- "line": 204
4595
+ "line": 243
4262
4596
  },
4263
4597
  "name": "password",
4264
4598
  "type": {
4265
4599
  "primitive": "string"
4266
4600
  }
4601
+ },
4602
+ {
4603
+ "docs": {
4604
+ "stability": "experimental",
4605
+ "summary": "The IdleMonitor construct (only present if enableAutoStop is true)."
4606
+ },
4607
+ "immutable": true,
4608
+ "locationInModule": {
4609
+ "filename": "src/vscode-server.ts",
4610
+ "line": 253
4611
+ },
4612
+ "name": "idleMonitor",
4613
+ "optional": true,
4614
+ "type": {
4615
+ "fqn": "@mavogel/cdk-vscode-server.IdleMonitor"
4616
+ }
4267
4617
  }
4268
4618
  ],
4269
4619
  "symbolId": "src/vscode-server:VSCodeServer"
@@ -4279,7 +4629,7 @@
4279
4629
  "kind": "interface",
4280
4630
  "locationInModule": {
4281
4631
  "filename": "src/vscode-server.ts",
4282
- "line": 27
4632
+ "line": 29
4283
4633
  },
4284
4634
  "name": "VSCodeServerProps",
4285
4635
  "properties": [
@@ -4293,7 +4643,7 @@
4293
4643
  "immutable": true,
4294
4644
  "locationInModule": {
4295
4645
  "filename": "src/vscode-server.ts",
4296
- "line": 110
4646
+ "line": 112
4297
4647
  },
4298
4648
  "name": "additionalInstanceRolePolicies",
4299
4649
  "optional": true,
@@ -4316,7 +4666,7 @@
4316
4666
  "immutable": true,
4317
4667
  "locationInModule": {
4318
4668
  "filename": "src/vscode-server.ts",
4319
- "line": 117
4669
+ "line": 119
4320
4670
  },
4321
4671
  "name": "additionalTags",
4322
4672
  "optional": true,
@@ -4339,7 +4689,7 @@
4339
4689
  "immutable": true,
4340
4690
  "locationInModule": {
4341
4691
  "filename": "src/vscode-server.ts",
4342
- "line": 154
4692
+ "line": 156
4343
4693
  },
4344
4694
  "name": "autoCreateCertificate",
4345
4695
  "optional": true,
@@ -4357,7 +4707,7 @@
4357
4707
  "immutable": true,
4358
4708
  "locationInModule": {
4359
4709
  "filename": "src/vscode-server.ts",
4360
- "line": 144
4710
+ "line": 146
4361
4711
  },
4362
4712
  "name": "certificateArn",
4363
4713
  "optional": true,
@@ -4375,7 +4725,7 @@
4375
4725
  "immutable": true,
4376
4726
  "locationInModule": {
4377
4727
  "filename": "src/vscode-server.ts",
4378
- "line": 96
4728
+ "line": 98
4379
4729
  },
4380
4730
  "name": "devServerBasePath",
4381
4731
  "optional": true,
@@ -4393,7 +4743,7 @@
4393
4743
  "immutable": true,
4394
4744
  "locationInModule": {
4395
4745
  "filename": "src/vscode-server.ts",
4396
- "line": 103
4746
+ "line": 105
4397
4747
  },
4398
4748
  "name": "devServerPort",
4399
4749
  "optional": true,
@@ -4411,7 +4761,7 @@
4411
4761
  "immutable": true,
4412
4762
  "locationInModule": {
4413
4763
  "filename": "src/vscode-server.ts",
4414
- "line": 126
4764
+ "line": 128
4415
4765
  },
4416
4766
  "name": "domainName",
4417
4767
  "optional": true,
@@ -4419,6 +4769,24 @@
4419
4769
  "primitive": "string"
4420
4770
  }
4421
4771
  },
4772
+ {
4773
+ "abstract": true,
4774
+ "docs": {
4775
+ "default": "false",
4776
+ "stability": "experimental",
4777
+ "summary": "Enable automatic instance stop when idle Monitors CloudFront metrics and stops the EC2 instance after specified idle time."
4778
+ },
4779
+ "immutable": true,
4780
+ "locationInModule": {
4781
+ "filename": "src/vscode-server.ts",
4782
+ "line": 164
4783
+ },
4784
+ "name": "enableAutoStop",
4785
+ "optional": true,
4786
+ "type": {
4787
+ "primitive": "boolean"
4788
+ }
4789
+ },
4422
4790
  {
4423
4791
  "abstract": true,
4424
4792
  "docs": {
@@ -4429,7 +4797,7 @@
4429
4797
  "immutable": true,
4430
4798
  "locationInModule": {
4431
4799
  "filename": "src/vscode-server.ts",
4432
- "line": 89
4800
+ "line": 91
4433
4801
  },
4434
4802
  "name": "homeFolder",
4435
4803
  "optional": true,
@@ -4447,7 +4815,7 @@
4447
4815
  "immutable": true,
4448
4816
  "locationInModule": {
4449
4817
  "filename": "src/vscode-server.ts",
4450
- "line": 135
4818
+ "line": 137
4451
4819
  },
4452
4820
  "name": "hostedZoneId",
4453
4821
  "optional": true,
@@ -4455,6 +4823,42 @@
4455
4823
  "primitive": "string"
4456
4824
  }
4457
4825
  },
4826
+ {
4827
+ "abstract": true,
4828
+ "docs": {
4829
+ "default": "5 - Check every 5 minutes",
4830
+ "stability": "experimental",
4831
+ "summary": "How often to check for idle activity (in minutes) Only applies when enableAutoStop is true."
4832
+ },
4833
+ "immutable": true,
4834
+ "locationInModule": {
4835
+ "filename": "src/vscode-server.ts",
4836
+ "line": 180
4837
+ },
4838
+ "name": "idleCheckIntervalMinutes",
4839
+ "optional": true,
4840
+ "type": {
4841
+ "primitive": "number"
4842
+ }
4843
+ },
4844
+ {
4845
+ "abstract": true,
4846
+ "docs": {
4847
+ "default": "30",
4848
+ "stability": "experimental",
4849
+ "summary": "Minutes of inactivity before stopping the instance Only applies when enableAutoStop is true."
4850
+ },
4851
+ "immutable": true,
4852
+ "locationInModule": {
4853
+ "filename": "src/vscode-server.ts",
4854
+ "line": 172
4855
+ },
4856
+ "name": "idleTimeoutMinutes",
4857
+ "optional": true,
4858
+ "type": {
4859
+ "primitive": "number"
4860
+ }
4861
+ },
4458
4862
  {
4459
4863
  "abstract": true,
4460
4864
  "docs": {
@@ -4465,7 +4869,7 @@
4465
4869
  "immutable": true,
4466
4870
  "locationInModule": {
4467
4871
  "filename": "src/vscode-server.ts",
4468
- "line": 61
4872
+ "line": 63
4469
4873
  },
4470
4874
  "name": "instanceClass",
4471
4875
  "optional": true,
@@ -4483,7 +4887,7 @@
4483
4887
  "immutable": true,
4484
4888
  "locationInModule": {
4485
4889
  "filename": "src/vscode-server.ts",
4486
- "line": 82
4890
+ "line": 84
4487
4891
  },
4488
4892
  "name": "instanceCpuArchitecture",
4489
4893
  "optional": true,
@@ -4501,7 +4905,7 @@
4501
4905
  "immutable": true,
4502
4906
  "locationInModule": {
4503
4907
  "filename": "src/vscode-server.ts",
4504
- "line": 47
4908
+ "line": 49
4505
4909
  },
4506
4910
  "name": "instanceName",
4507
4911
  "optional": true,
@@ -4519,7 +4923,7 @@
4519
4923
  "immutable": true,
4520
4924
  "locationInModule": {
4521
4925
  "filename": "src/vscode-server.ts",
4522
- "line": 75
4926
+ "line": 77
4523
4927
  },
4524
4928
  "name": "instanceOperatingSystem",
4525
4929
  "optional": true,
@@ -4537,7 +4941,7 @@
4537
4941
  "immutable": true,
4538
4942
  "locationInModule": {
4539
4943
  "filename": "src/vscode-server.ts",
4540
- "line": 68
4944
+ "line": 70
4541
4945
  },
4542
4946
  "name": "instanceSize",
4543
4947
  "optional": true,
@@ -4555,7 +4959,7 @@
4555
4959
  "immutable": true,
4556
4960
  "locationInModule": {
4557
4961
  "filename": "src/vscode-server.ts",
4558
- "line": 54
4962
+ "line": 56
4559
4963
  },
4560
4964
  "name": "instanceVolumeSize",
4561
4965
  "optional": true,
@@ -4563,6 +4967,25 @@
4563
4967
  "primitive": "number"
4564
4968
  }
4565
4969
  },
4970
+ {
4971
+ "abstract": true,
4972
+ "docs": {
4973
+ "default": "false",
4974
+ "remarks": "WARNING: For testing only - in production, you should wait for status checks\nto pass before stopping instances to avoid stopping unhealthy instances",
4975
+ "stability": "experimental",
4976
+ "summary": "Skip instance status checks in IdleMonitor When true, IdleMonitor will stop idle instances even if status checks haven't passed This is useful for integration tests where status check initialization time exceeds the test timeout limits."
4977
+ },
4978
+ "immutable": true,
4979
+ "locationInModule": {
4980
+ "filename": "src/vscode-server.ts",
4981
+ "line": 193
4982
+ },
4983
+ "name": "skipStatusChecks",
4984
+ "optional": true,
4985
+ "type": {
4986
+ "primitive": "boolean"
4987
+ }
4988
+ },
4566
4989
  {
4567
4990
  "abstract": true,
4568
4991
  "docs": {
@@ -4573,7 +4996,7 @@
4573
4996
  "immutable": true,
4574
4997
  "locationInModule": {
4575
4998
  "filename": "src/vscode-server.ts",
4576
- "line": 40
4999
+ "line": 42
4577
5000
  },
4578
5001
  "name": "vscodePassword",
4579
5002
  "optional": true,
@@ -4591,7 +5014,7 @@
4591
5014
  "immutable": true,
4592
5015
  "locationInModule": {
4593
5016
  "filename": "src/vscode-server.ts",
4594
- "line": 33
5017
+ "line": 35
4595
5018
  },
4596
5019
  "name": "vscodeUser",
4597
5020
  "optional": true,
@@ -4603,6 +5026,6 @@
4603
5026
  "symbolId": "src/vscode-server:VSCodeServerProps"
4604
5027
  }
4605
5028
  },
4606
- "version": "0.0.60",
4607
- "fingerprint": "KALG9BRQbEbg6W5HIa8LnU78Xd+kyM0I4M1IzhCDdy8="
5029
+ "version": "0.0.61",
5030
+ "fingerprint": "qfD9LmqMEXJBJyPLrEX6GfeGzezT9TOhGVGOpIUkwYo="
4608
5031
  }