cdk-code-server 0.0.13__py3-none-any.whl → 1.0.0__py3-none-any.whl

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.
@@ -65,17 +65,17 @@ new CodeServer(this, 'CodeServer', {
65
65
 
66
66
  ## Setup VSCode Server
67
67
 
68
- After the stack is deployed, you can access to the server via EC2 instance connect endpoint(EIC endpoint) and create connection to the VSCode server:
68
+ After the stack is deployed, you can access the server via AWS Systems Manager (SSM) Session Manager by default and start the VSCode server:
69
69
 
70
- ### Access to the EC2 instance
70
+ ### Access to the EC2 instance (Default: SSM)
71
71
 
72
- Access the EC2 management console in the AWS Console, and connect to your EC2 instance via the EIC Endpoint.
72
+ 1. In the AWS Console, go to the EC2 Instances page and select your instance.
73
+ 2. Click the "Connect" button, choose "Session Manager", and click "Connect".
74
+ 3. Once connected, switch to the ec2-user account:
73
75
 
74
- Select the Instance ID > Connect > EC2 Instance Connect > Connect using EC2 Instance Connect Endpoint > Connect
75
-
76
- If the following screen is displayed, you're all set.
77
-
78
- ![EC2 Instance Connect](./images/console.png)
76
+ ```sh
77
+ sudo su --login ec2-user
78
+ ```
79
79
 
80
80
  ### Start the VSCode server
81
81
 
@@ -117,6 +117,21 @@ At this point, the GitHub authentication screen may appear again, so press Autho
117
117
  Once you open the terminal, you’re all set.
118
118
 
119
119
  ![VSCode](./images/vscode.png)
120
+
121
+ ---
122
+
123
+
124
+ ### (Option) Access via EC2 Instance Connect Endpoint (EIC Endpoint)
125
+
126
+ If the `useInstanceConnectEndpoint` option is set to true, you can connect via the EC2 Instance Connect Endpoint.
127
+
128
+ 1. In the AWS Console, go to the EC2 Instances page and select your instance.
129
+ 2. Click the "Connect" button, choose "EC2 Instance Connect", then select "Connect using EC2 Instance Connect Endpoint", and click "Connect".
130
+ 3. Once connected, you will see a screen similar to the following:
131
+
132
+ ![EC2 Instance Connect](./images/console.png)
133
+
134
+ 1. Follow the same steps as in the SSM section to start the VSCode server and connect via tunnel.
120
135
  '''
121
136
  from pkgutil import extend_path
122
137
  __path__ = extend_path(__path__, __name__)
@@ -170,6 +185,7 @@ class CodeServer(
170
185
  cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
171
186
  instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
172
187
  policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
188
+ use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
173
189
  user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
174
190
  volume_size: typing.Optional[jsii.Number] = None,
175
191
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
@@ -180,6 +196,7 @@ class CodeServer(
180
196
  :param cpu_type: The CPU type. Default: - ARM_64
181
197
  :param instance_type: The instance type. Default: - C7g.2xlarge
182
198
  :param policy: The IAM policy to attach to the instance role. Default: - Allow all actions on all resources
199
+ :param use_instance_connect_endpoint: Whether to use EC2 instance connect endpoint for instance access. If set to true, it will create an EC2 Instance Connect Endpoint in the VPC. You can access the instance using either EC2 Instance Connect or SSM Session Manager. Default: false - Uses only SSM Session Manager for instance access
183
200
  :param user_data: User data to run when launching the instance. Default: - No additional user data
184
201
  :param volume_size: The size of the root volume in GiB. Default: 30
185
202
  :param vpc: The VPC where the instance will be deployed. Default: - A new VPC will be created
@@ -192,6 +209,7 @@ class CodeServer(
192
209
  cpu_type=cpu_type,
193
210
  instance_type=instance_type,
194
211
  policy=policy,
212
+ use_instance_connect_endpoint=use_instance_connect_endpoint,
195
213
  user_data=user_data,
196
214
  volume_size=volume_size,
197
215
  vpc=vpc,
@@ -207,6 +225,7 @@ class CodeServer(
207
225
  "cpu_type": "cpuType",
208
226
  "instance_type": "instanceType",
209
227
  "policy": "policy",
228
+ "use_instance_connect_endpoint": "useInstanceConnectEndpoint",
210
229
  "user_data": "userData",
211
230
  "volume_size": "volumeSize",
212
231
  "vpc": "vpc",
@@ -219,6 +238,7 @@ class CodeServerProps:
219
238
  cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
220
239
  instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
221
240
  policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
241
+ use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
222
242
  user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
223
243
  volume_size: typing.Optional[jsii.Number] = None,
224
244
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
@@ -228,6 +248,7 @@ class CodeServerProps:
228
248
  :param cpu_type: The CPU type. Default: - ARM_64
229
249
  :param instance_type: The instance type. Default: - C7g.2xlarge
230
250
  :param policy: The IAM policy to attach to the instance role. Default: - Allow all actions on all resources
251
+ :param use_instance_connect_endpoint: Whether to use EC2 instance connect endpoint for instance access. If set to true, it will create an EC2 Instance Connect Endpoint in the VPC. You can access the instance using either EC2 Instance Connect or SSM Session Manager. Default: false - Uses only SSM Session Manager for instance access
231
252
  :param user_data: User data to run when launching the instance. Default: - No additional user data
232
253
  :param volume_size: The size of the root volume in GiB. Default: 30
233
254
  :param vpc: The VPC where the instance will be deployed. Default: - A new VPC will be created
@@ -237,6 +258,7 @@ class CodeServerProps:
237
258
  check_type(argname="argument cpu_type", value=cpu_type, expected_type=type_hints["cpu_type"])
238
259
  check_type(argname="argument instance_type", value=instance_type, expected_type=type_hints["instance_type"])
239
260
  check_type(argname="argument policy", value=policy, expected_type=type_hints["policy"])
261
+ check_type(argname="argument use_instance_connect_endpoint", value=use_instance_connect_endpoint, expected_type=type_hints["use_instance_connect_endpoint"])
240
262
  check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
241
263
  check_type(argname="argument volume_size", value=volume_size, expected_type=type_hints["volume_size"])
242
264
  check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
@@ -247,6 +269,8 @@ class CodeServerProps:
247
269
  self._values["instance_type"] = instance_type
248
270
  if policy is not None:
249
271
  self._values["policy"] = policy
272
+ if use_instance_connect_endpoint is not None:
273
+ self._values["use_instance_connect_endpoint"] = use_instance_connect_endpoint
250
274
  if user_data is not None:
251
275
  self._values["user_data"] = user_data
252
276
  if volume_size is not None:
@@ -281,6 +305,18 @@ class CodeServerProps:
281
305
  result = self._values.get("policy")
282
306
  return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement], result)
283
307
 
308
+ @builtins.property
309
+ def use_instance_connect_endpoint(self) -> typing.Optional[builtins.bool]:
310
+ '''Whether to use EC2 instance connect endpoint for instance access.
311
+
312
+ If set to true, it will create an EC2 Instance Connect Endpoint in the VPC.
313
+ You can access the instance using either EC2 Instance Connect or SSM Session Manager.
314
+
315
+ :default: false - Uses only SSM Session Manager for instance access
316
+ '''
317
+ result = self._values.get("use_instance_connect_endpoint")
318
+ return typing.cast(typing.Optional[builtins.bool], result)
319
+
284
320
  @builtins.property
285
321
  def user_data(self) -> typing.Optional[typing.List[builtins.str]]:
286
322
  '''User data to run when launching the instance.
@@ -334,6 +370,7 @@ def _typecheckingstub__a3dc073ef85aeeab8ffd2fe5c32c737ce76d0e4197f8d84ff2cfe4d4a
334
370
  cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
335
371
  instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
336
372
  policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
373
+ use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
337
374
  user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
338
375
  volume_size: typing.Optional[jsii.Number] = None,
339
376
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
@@ -346,6 +383,7 @@ def _typecheckingstub__fb583e2cef71433ccfaa187bf48195bf7085ded509b20a2c01dc80cff
346
383
  cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
347
384
  instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
348
385
  policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
386
+ use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
349
387
  user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
350
388
  volume_size: typing.Optional[jsii.Number] = None,
351
389
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
@@ -32,7 +32,7 @@ import aws_cdk._jsii
32
32
  import constructs._jsii
33
33
 
34
34
  __jsii_assembly__ = jsii.JSIIAssembly.load(
35
- "cdk-code-server", "0.0.13", __name__[0:-6], "cdk-code-server@0.0.13.jsii.tgz"
35
+ "cdk-code-server", "1.0.0", __name__[0:-6], "cdk-code-server@1.0.0.jsii.tgz"
36
36
  )
37
37
 
38
38
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cdk-code-server
3
- Version: 0.0.13
3
+ Version: 1.0.0
4
4
  Summary: CDK Construct for a VSCode Server development environment on EC2
5
5
  Home-page: https://github.com/badmintoncryer/cdk-code-server.git
6
6
  Author: Kazuho CryerShinozuka<malaysia.cryer@gmail.com>
@@ -91,17 +91,17 @@ new CodeServer(this, 'CodeServer', {
91
91
 
92
92
  ## Setup VSCode Server
93
93
 
94
- After the stack is deployed, you can access to the server via EC2 instance connect endpoint(EIC endpoint) and create connection to the VSCode server:
94
+ After the stack is deployed, you can access the server via AWS Systems Manager (SSM) Session Manager by default and start the VSCode server:
95
95
 
96
- ### Access to the EC2 instance
96
+ ### Access to the EC2 instance (Default: SSM)
97
97
 
98
- Access the EC2 management console in the AWS Console, and connect to your EC2 instance via the EIC Endpoint.
98
+ 1. In the AWS Console, go to the EC2 Instances page and select your instance.
99
+ 2. Click the "Connect" button, choose "Session Manager", and click "Connect".
100
+ 3. Once connected, switch to the ec2-user account:
99
101
 
100
- Select the Instance ID > Connect > EC2 Instance Connect > Connect using EC2 Instance Connect Endpoint > Connect
101
-
102
- If the following screen is displayed, you're all set.
103
-
104
- ![EC2 Instance Connect](./images/console.png)
102
+ ```sh
103
+ sudo su --login ec2-user
104
+ ```
105
105
 
106
106
  ### Start the VSCode server
107
107
 
@@ -143,3 +143,18 @@ At this point, the GitHub authentication screen may appear again, so press Autho
143
143
  Once you open the terminal, you’re all set.
144
144
 
145
145
  ![VSCode](./images/vscode.png)
146
+
147
+ ---
148
+
149
+
150
+ ### (Option) Access via EC2 Instance Connect Endpoint (EIC Endpoint)
151
+
152
+ If the `useInstanceConnectEndpoint` option is set to true, you can connect via the EC2 Instance Connect Endpoint.
153
+
154
+ 1. In the AWS Console, go to the EC2 Instances page and select your instance.
155
+ 2. Click the "Connect" button, choose "EC2 Instance Connect", then select "Connect using EC2 Instance Connect Endpoint", and click "Connect".
156
+ 3. Once connected, you will see a screen similar to the following:
157
+
158
+ ![EC2 Instance Connect](./images/console.png)
159
+
160
+ 1. Follow the same steps as in the SSM section to start the VSCode server and connect via tunnel.
@@ -0,0 +1,9 @@
1
+ cdk_code_server/__init__.py,sha256=ABcpjzx8Enzmgh6EfxIukSZq7D022-iuP6elrBXxkv4,17391
2
+ cdk_code_server/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ cdk_code_server/_jsii/__init__.py,sha256=N_WUGIttWO-b69RKE6ppDsyty13Blxxbt44SWZQfUyQ,1441
4
+ cdk_code_server/_jsii/cdk-code-server@1.0.0.jsii.tgz,sha256=s14IBySolWAlWDMOQIQsGi5v6ehlINdxztI3wyvY6Rk,1312132
5
+ cdk_code_server-1.0.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ cdk_code_server-1.0.0.dist-info/METADATA,sha256=bfOaHzx4PoB7aZHgIl3RtxfmtCaQzZUikNpDuPVKHDY,6629
7
+ cdk_code_server-1.0.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
8
+ cdk_code_server-1.0.0.dist-info/top_level.txt,sha256=UPdb0hVf1P6GpgMW16KwUQ3sBADg2WccQHQeL85PrBU,16
9
+ cdk_code_server-1.0.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- cdk_code_server/__init__.py,sha256=OgrsOboDe9XyeSklFj90EnH3cmK7s0urd7hRAzrdQjw,14816
2
- cdk_code_server/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- cdk_code_server/_jsii/__init__.py,sha256=uur0aaf67C7jzT3xtMX9FQqzl56zEP2Sd7mGH5-RzEg,1443
4
- cdk_code_server/_jsii/cdk-code-server@0.0.13.jsii.tgz,sha256=0_IoiOQWiI_H61LXOQhBkBbVQJuVRhrR_Nq3rCJdjVE,1311149
5
- cdk_code_server-0.0.13.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
- cdk_code_server-0.0.13.dist-info/METADATA,sha256=0tXd_fNn0TxUawCPNXvkxion62brE_dosyOaZ0FKClI,6080
7
- cdk_code_server-0.0.13.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
8
- cdk_code_server-0.0.13.dist-info/top_level.txt,sha256=UPdb0hVf1P6GpgMW16KwUQ3sBADg2WccQHQeL85PrBU,16
9
- cdk_code_server-0.0.13.dist-info/RECORD,,