konokenj.cdk-api-mcp-server 0.41.0__py3-none-any.whl → 0.42.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.
Potentially problematic release.
This version of konokenj.cdk-api-mcp-server might be problematic. Click here for more details.
- cdk_api_mcp_server/__about__.py +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-alpha/README.md +540 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md +44 -46
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-lambda-python-alpha/README.md +6 -6
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-s3tables-alpha/README.md +28 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.api-dualstack.ts +3 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.api.ts +2 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.stage.ts +7 -20
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.iam.ts +34 -38
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.sqs.ts +58 -71
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codepipeline-actions/integ.pipeline-elastic-beanstalk-deploy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cognito/README.md +11 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cognito/integ.user-pool-client-explicit-props.ts +1 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/README.md +38 -13
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb-v2.cci.ts +49 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.cci.ts +27 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.dynamodb.contirubtor-insights-for-gsi.ts +6 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-dynamodb/integ.table-v2-global.ts +9 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md +3 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.ebs-volume-initialization-rate.ts +80 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs-patterns/README.md +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs-patterns/integ.alb-fargate-service-smart-defaults.ts +143 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events/README.md +25 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-events/integ.archive-customer-managed-key.ts +23 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/README.md +18 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-sns/README.md +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-sns-subscriptions/integ.sns-sqs-subscription-filter.ts +75 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-sns-subscriptions/integ.sns-sqs.ts +21 -40
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.invoke-jsonata.ts +87 -80
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.invoke.ts +87 -69
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.start-job-run.ts +102 -104
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +28 -1
- {konokenj_cdk_api_mcp_server-0.41.0.dist-info → konokenj_cdk_api_mcp_server-0.42.0.dist-info}/METADATA +2 -2
- {konokenj_cdk_api_mcp_server-0.41.0.dist-info → konokenj_cdk_api_mcp_server-0.42.0.dist-info}/RECORD +37 -31
- {konokenj_cdk_api_mcp_server-0.41.0.dist-info → konokenj_cdk_api_mcp_server-0.42.0.dist-info}/WHEEL +0 -0
- {konokenj_cdk_api_mcp_server-0.41.0.dist-info → konokenj_cdk_api_mcp_server-0.42.0.dist-info}/entry_points.txt +0 -0
- {konokenj_cdk_api_mcp_server-0.41.0.dist-info → konokenj_cdk_api_mcp_server-0.42.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -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_33,
|
|
37
37
|
});
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -73,7 +73,7 @@ Creating a new cluster is done using the `Cluster` constructs. The only required
|
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
new eks.Cluster(this, 'HelloEKS', {
|
|
76
|
-
version: eks.KubernetesVersion.
|
|
76
|
+
version: eks.KubernetesVersion.V1_33,
|
|
77
77
|
});
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -81,7 +81,7 @@ You can also use `FargateCluster` to provision a cluster that uses only fargate
|
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
83
|
new eks.FargateCluster(this, 'HelloEKS', {
|
|
84
|
-
version: eks.KubernetesVersion.
|
|
84
|
+
version: eks.KubernetesVersion.V1_33,
|
|
85
85
|
});
|
|
86
86
|
```
|
|
87
87
|
|
|
@@ -90,21 +90,21 @@ be created by default. It will only be deployed when `kubectlProviderOptions`
|
|
|
90
90
|
property is used.**
|
|
91
91
|
|
|
92
92
|
```ts
|
|
93
|
-
import {
|
|
93
|
+
import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33';
|
|
94
94
|
|
|
95
95
|
new eks.Cluster(this, 'hello-eks', {
|
|
96
|
-
version: eks.KubernetesVersion.
|
|
96
|
+
version: eks.KubernetesVersion.V1_33,
|
|
97
97
|
kubectlProviderOptions: {
|
|
98
|
-
kubectlLayer: new
|
|
98
|
+
kubectlLayer: new KubectlV33Layer(this, 'kubectl'),
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
### EKS Auto Mode
|
|
104
104
|
|
|
105
105
|
[Amazon EKS Auto Mode](https://aws.amazon.com/eks/auto-mode/) extends AWS management of Kubernetes clusters beyond the cluster itself, allowing AWS to set up and manage the infrastructure that enables the smooth operation of your workloads.
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
#### Using Auto Mode
|
|
108
108
|
|
|
109
109
|
While `aws-eks` uses `DefaultCapacityType.NODEGROUP` by default, `aws-eks-v2` uses `DefaultCapacityType.AUTOMODE` as the default capacity type.
|
|
110
110
|
|
|
@@ -113,7 +113,7 @@ Auto Mode is enabled by default when creating a new cluster without specifying a
|
|
|
113
113
|
```ts
|
|
114
114
|
// Create EKS cluster with Auto Mode implicitly enabled
|
|
115
115
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
116
|
-
version: eks.KubernetesVersion.
|
|
116
|
+
version: eks.KubernetesVersion.V1_33,
|
|
117
117
|
});
|
|
118
118
|
```
|
|
119
119
|
|
|
@@ -122,12 +122,12 @@ You can also explicitly enable Auto Mode using `defaultCapacityType`:
|
|
|
122
122
|
```ts
|
|
123
123
|
// Create EKS cluster with Auto Mode explicitly enabled
|
|
124
124
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
125
|
-
version: eks.KubernetesVersion.
|
|
125
|
+
version: eks.KubernetesVersion.V1_33,
|
|
126
126
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
127
127
|
});
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
#### Node Pools
|
|
131
131
|
|
|
132
132
|
When Auto Mode is enabled, the cluster comes with two default node pools:
|
|
133
133
|
|
|
@@ -138,7 +138,7 @@ These node pools are managed automatically by EKS. You can configure which node
|
|
|
138
138
|
|
|
139
139
|
```ts
|
|
140
140
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
141
|
-
version: eks.KubernetesVersion.
|
|
141
|
+
version: eks.KubernetesVersion.V1_33,
|
|
142
142
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
143
143
|
compute: {
|
|
144
144
|
nodePools: ['system', 'general-purpose'],
|
|
@@ -148,13 +148,13 @@ const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
|
148
148
|
|
|
149
149
|
For more information, see [Create a Node Pool for EKS Auto Mode](https://docs.aws.amazon.com/eks/latest/userguide/create-node-pool.html).
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
#### Disabling Default Node Pools
|
|
152
152
|
|
|
153
153
|
You can disable the default node pools entirely by setting an empty array for `nodePools`. This is useful when you want to use Auto Mode features but manage your compute resources separately:
|
|
154
154
|
|
|
155
155
|
```ts
|
|
156
156
|
const cluster = new eks.Cluster(this, 'EksAutoCluster', {
|
|
157
|
-
version: eks.KubernetesVersion.
|
|
157
|
+
version: eks.KubernetesVersion.V1_33,
|
|
158
158
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
159
159
|
compute: {
|
|
160
160
|
nodePools: [], // Disable default node pools
|
|
@@ -171,7 +171,7 @@ If you prefer to manage your own node groups instead of using Auto Mode, you can
|
|
|
171
171
|
```ts
|
|
172
172
|
// Create EKS cluster with traditional managed node group
|
|
173
173
|
const cluster = new eks.Cluster(this, 'EksCluster', {
|
|
174
|
-
version: eks.KubernetesVersion.
|
|
174
|
+
version: eks.KubernetesVersion.V1_33,
|
|
175
175
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
176
176
|
defaultCapacity: 3, // Number of instances
|
|
177
177
|
defaultCapacityInstance: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.LARGE),
|
|
@@ -182,7 +182,7 @@ You can also create a cluster with no initial capacity and add node groups later
|
|
|
182
182
|
|
|
183
183
|
```ts
|
|
184
184
|
const cluster = new eks.Cluster(this, 'EksCluster', {
|
|
185
|
-
version: eks.KubernetesVersion.
|
|
185
|
+
version: eks.KubernetesVersion.V1_33,
|
|
186
186
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
187
187
|
defaultCapacity: 0,
|
|
188
188
|
});
|
|
@@ -203,7 +203,7 @@ You can combine Auto Mode with traditional node groups for specific workload req
|
|
|
203
203
|
|
|
204
204
|
```ts
|
|
205
205
|
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
206
|
-
version: eks.KubernetesVersion.
|
|
206
|
+
version: eks.KubernetesVersion.V1_33,
|
|
207
207
|
defaultCapacityType: eks.DefaultCapacityType.AUTOMODE,
|
|
208
208
|
compute: {
|
|
209
209
|
nodePools: ['system', 'general-purpose'],
|
|
@@ -243,7 +243,7 @@ By default, when using `DefaultCapacityType.NODEGROUP`, this library will alloca
|
|
|
243
243
|
|
|
244
244
|
```ts
|
|
245
245
|
new eks.Cluster(this, 'HelloEKS', {
|
|
246
|
-
version: eks.KubernetesVersion.
|
|
246
|
+
version: eks.KubernetesVersion.V1_33,
|
|
247
247
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
248
248
|
});
|
|
249
249
|
```
|
|
@@ -252,7 +252,7 @@ At cluster instantiation time, you can customize the number of instances and the
|
|
|
252
252
|
|
|
253
253
|
```ts
|
|
254
254
|
new eks.Cluster(this, 'HelloEKS', {
|
|
255
|
-
version: eks.KubernetesVersion.
|
|
255
|
+
version: eks.KubernetesVersion.V1_33,
|
|
256
256
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
257
257
|
defaultCapacity: 5,
|
|
258
258
|
defaultCapacityInstance: ec2.InstanceType.of(ec2.InstanceClass.M5, ec2.InstanceSize.SMALL),
|
|
@@ -265,7 +265,7 @@ Additional customizations are available post instantiation. To apply them, set t
|
|
|
265
265
|
|
|
266
266
|
```ts
|
|
267
267
|
const cluster = new eks.Cluster(this, 'HelloEKS', {
|
|
268
|
-
version: eks.KubernetesVersion.
|
|
268
|
+
version: eks.KubernetesVersion.V1_33,
|
|
269
269
|
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
270
270
|
defaultCapacity: 0,
|
|
271
271
|
});
|
|
@@ -316,7 +316,7 @@ The following code defines an Amazon EKS cluster with a default Fargate Profile
|
|
|
316
316
|
|
|
317
317
|
```ts
|
|
318
318
|
const cluster = new eks.FargateCluster(this, 'MyCluster', {
|
|
319
|
-
version: eks.KubernetesVersion.
|
|
319
|
+
version: eks.KubernetesVersion.V1_33,
|
|
320
320
|
});
|
|
321
321
|
```
|
|
322
322
|
|
|
@@ -335,7 +335,7 @@ You can configure the [cluster endpoint access](https://docs.aws.amazon.com/eks/
|
|
|
335
335
|
|
|
336
336
|
```ts
|
|
337
337
|
const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
338
|
-
version: eks.KubernetesVersion.
|
|
338
|
+
version: eks.KubernetesVersion.V1_33,
|
|
339
339
|
endpointAccess: eks.EndpointAccess.PRIVATE, // No access outside of your VPC.
|
|
340
340
|
});
|
|
341
341
|
```
|
|
@@ -357,7 +357,7 @@ To deploy the controller on your EKS cluster, configure the `albController` prop
|
|
|
357
357
|
|
|
358
358
|
```ts
|
|
359
359
|
new eks.Cluster(this, 'HelloEKS', {
|
|
360
|
-
version: eks.KubernetesVersion.
|
|
360
|
+
version: eks.KubernetesVersion.V1_33,
|
|
361
361
|
albController: {
|
|
362
362
|
version: eks.AlbControllerVersion.V2_8_2,
|
|
363
363
|
},
|
|
@@ -398,7 +398,7 @@ You can specify the VPC of the cluster using the `vpc` and `vpcSubnets` properti
|
|
|
398
398
|
declare const vpc: ec2.Vpc;
|
|
399
399
|
|
|
400
400
|
new eks.Cluster(this, 'HelloEKS', {
|
|
401
|
-
version: eks.KubernetesVersion.
|
|
401
|
+
version: eks.KubernetesVersion.V1_33,
|
|
402
402
|
vpc,
|
|
403
403
|
vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }],
|
|
404
404
|
});
|
|
@@ -441,12 +441,12 @@ To create a `Kubectl Handler`, use `kubectlProviderOptions` when creating the cl
|
|
|
441
441
|
`kubectlLayer` is the only required property in `kubectlProviderOptions`.
|
|
442
442
|
|
|
443
443
|
```ts
|
|
444
|
-
import {
|
|
444
|
+
import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33';
|
|
445
445
|
|
|
446
446
|
new eks.Cluster(this, 'hello-eks', {
|
|
447
|
-
version: eks.KubernetesVersion.
|
|
447
|
+
version: eks.KubernetesVersion.V1_33,
|
|
448
448
|
kubectlProviderOptions: {
|
|
449
|
-
kubectlLayer: new
|
|
449
|
+
kubectlLayer: new KubectlV33Layer(this, 'kubectl'),
|
|
450
450
|
}
|
|
451
451
|
});
|
|
452
452
|
```
|
|
@@ -456,8 +456,6 @@ new eks.Cluster(this, 'hello-eks', {
|
|
|
456
456
|
If you want to use an existing kubectl provider function, for example with tight trusted entities on your IAM Roles - you can import the existing provider and then use the imported provider when importing the cluster:
|
|
457
457
|
|
|
458
458
|
```ts
|
|
459
|
-
import { KubectlV32Layer } from '@aws-cdk/lambda-layer-kubectl-v32';
|
|
460
|
-
|
|
461
459
|
const handlerRole = iam.Role.fromRoleArn(this, 'HandlerRole', 'arn:aws:iam::123456789012:role/lambda-role');
|
|
462
460
|
// get the serivceToken from the custom resource provider
|
|
463
461
|
const functionArn = lambda.Function.fromFunctionName(this, 'ProviderOnEventFunc', 'ProviderframeworkonEvent-XXX').functionArn;
|
|
@@ -477,12 +475,12 @@ const cluster = eks.Cluster.fromClusterAttributes(this, 'Cluster', {
|
|
|
477
475
|
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:
|
|
478
476
|
|
|
479
477
|
```ts
|
|
480
|
-
import {
|
|
478
|
+
import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33';
|
|
481
479
|
|
|
482
480
|
const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
483
|
-
version: eks.KubernetesVersion.
|
|
481
|
+
version: eks.KubernetesVersion.V1_33,
|
|
484
482
|
kubectlProviderOptions: {
|
|
485
|
-
kubectlLayer: new
|
|
483
|
+
kubectlLayer: new KubectlV33Layer(this, 'kubectl'),
|
|
486
484
|
environment: {
|
|
487
485
|
'http_proxy': 'http://proxy.myproxy.com',
|
|
488
486
|
},
|
|
@@ -503,12 +501,12 @@ Depending on which version of kubernetes you're targeting, you will need to use
|
|
|
503
501
|
the `@aws-cdk/lambda-layer-kubectl-vXY` packages.
|
|
504
502
|
|
|
505
503
|
```ts
|
|
506
|
-
import {
|
|
504
|
+
import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33';
|
|
507
505
|
|
|
508
506
|
const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
509
|
-
version: eks.KubernetesVersion.
|
|
507
|
+
version: eks.KubernetesVersion.V1_33,
|
|
510
508
|
kubectlProviderOptions: {
|
|
511
|
-
kubectlLayer: new
|
|
509
|
+
kubectlLayer: new KubectlV33Layer(this, 'kubectl'),
|
|
512
510
|
},
|
|
513
511
|
});
|
|
514
512
|
```
|
|
@@ -518,14 +516,14 @@ const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
|
518
516
|
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:
|
|
519
517
|
|
|
520
518
|
```ts
|
|
521
|
-
import {
|
|
519
|
+
import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33';
|
|
522
520
|
|
|
523
521
|
new eks.Cluster(this, 'MyCluster', {
|
|
524
522
|
kubectlProviderOptions: {
|
|
525
|
-
kubectlLayer: new
|
|
523
|
+
kubectlLayer: new KubectlV33Layer(this, 'kubectl'),
|
|
526
524
|
memory: Size.gibibytes(4),
|
|
527
525
|
},
|
|
528
|
-
version: eks.KubernetesVersion.
|
|
526
|
+
version: eks.KubernetesVersion.V1_33,
|
|
529
527
|
});
|
|
530
528
|
```
|
|
531
529
|
|
|
@@ -556,7 +554,7 @@ When you create a cluster, you can specify a `mastersRole`. The `Cluster` constr
|
|
|
556
554
|
```ts
|
|
557
555
|
declare const role: iam.Role;
|
|
558
556
|
new eks.Cluster(this, 'HelloEKS', {
|
|
559
|
-
version: eks.KubernetesVersion.
|
|
557
|
+
version: eks.KubernetesVersion.V1_33,
|
|
560
558
|
mastersRole: role,
|
|
561
559
|
});
|
|
562
560
|
```
|
|
@@ -577,7 +575,7 @@ You can use the `secretsEncryptionKey` to configure which key the cluster will u
|
|
|
577
575
|
const secretsKey = new kms.Key(this, 'SecretsKey');
|
|
578
576
|
const cluster = new eks.Cluster(this, 'MyCluster', {
|
|
579
577
|
secretsEncryptionKey: secretsKey,
|
|
580
|
-
version: eks.KubernetesVersion.
|
|
578
|
+
version: eks.KubernetesVersion.V1_33,
|
|
581
579
|
});
|
|
582
580
|
```
|
|
583
581
|
|
|
@@ -587,7 +585,7 @@ You can also use a similar configuration for running a cluster built using the F
|
|
|
587
585
|
const secretsKey = new kms.Key(this, 'SecretsKey');
|
|
588
586
|
const cluster = new eks.FargateCluster(this, 'MyFargateCluster', {
|
|
589
587
|
secretsEncryptionKey: secretsKey,
|
|
590
|
-
version: eks.KubernetesVersion.
|
|
588
|
+
version: eks.KubernetesVersion.V1_33,
|
|
591
589
|
});
|
|
592
590
|
```
|
|
593
591
|
|
|
@@ -628,7 +626,7 @@ eks.AccessPolicy.fromAccessPolicyName('AmazonEKSAdminPolicy', {
|
|
|
628
626
|
Use `grantAccess()` to grant the AccessPolicy to an IAM principal:
|
|
629
627
|
|
|
630
628
|
```ts
|
|
631
|
-
import {
|
|
629
|
+
import { KubectlV33Layer } from '@aws-cdk/lambda-layer-kubectl-v33';
|
|
632
630
|
declare const vpc: ec2.Vpc;
|
|
633
631
|
|
|
634
632
|
const clusterAdminRole = new iam.Role(this, 'ClusterAdminRole', {
|
|
@@ -642,9 +640,9 @@ const eksAdminRole = new iam.Role(this, 'EKSAdminRole', {
|
|
|
642
640
|
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
643
641
|
vpc,
|
|
644
642
|
mastersRole: clusterAdminRole,
|
|
645
|
-
version: eks.KubernetesVersion.
|
|
643
|
+
version: eks.KubernetesVersion.V1_33,
|
|
646
644
|
kubectlProviderOptions: {
|
|
647
|
-
kubectlLayer: new
|
|
645
|
+
kubectlLayer: new KubectlV33Layer(this, 'kubectl'),
|
|
648
646
|
memory: Size.gibibytes(4),
|
|
649
647
|
},
|
|
650
648
|
});
|
|
@@ -829,7 +827,7 @@ when a cluster is defined:
|
|
|
829
827
|
|
|
830
828
|
```ts
|
|
831
829
|
new eks.Cluster(this, 'MyCluster', {
|
|
832
|
-
version: eks.KubernetesVersion.
|
|
830
|
+
version: eks.KubernetesVersion.V1_33,
|
|
833
831
|
prune: false,
|
|
834
832
|
});
|
|
835
833
|
```
|
|
@@ -1145,7 +1143,7 @@ property. For example:
|
|
|
1145
1143
|
```ts
|
|
1146
1144
|
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
1147
1145
|
// ...
|
|
1148
|
-
version: eks.KubernetesVersion.
|
|
1146
|
+
version: eks.KubernetesVersion.V1_33,
|
|
1149
1147
|
clusterLogging: [
|
|
1150
1148
|
eks.ClusterLoggingTypes.API,
|
|
1151
1149
|
eks.ClusterLoggingTypes.AUTHENTICATOR,
|
|
@@ -210,12 +210,12 @@ new python.PythonFunction(this, 'function', {
|
|
|
210
210
|
entry,
|
|
211
211
|
runtime: Runtime.PYTHON_3_8,
|
|
212
212
|
bundling: {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
213
|
+
network: 'host',
|
|
214
|
+
securityOpt: 'no-new-privileges',
|
|
215
|
+
user: 'user:group',
|
|
216
|
+
volumesFrom: ['777f7dc92da7'],
|
|
217
|
+
volumes: [{ hostPath: '/host-path', containerPath: '/container-path' }],
|
|
218
|
+
},
|
|
219
219
|
});
|
|
220
220
|
```
|
|
221
221
|
|
|
@@ -159,9 +159,36 @@ const encryptedBucketAuto = new TableBucket(scope, 'EncryptedTableBucketAuto', {
|
|
|
159
159
|
});
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
+
### Controlling Table Permissions
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
// Grant the principal read permissions to the table
|
|
166
|
+
const accountId = '123456789012'
|
|
167
|
+
table.grantRead(new iam.AccountPrincipal(accountId));
|
|
168
|
+
|
|
169
|
+
// Grant the role write permissions to the table
|
|
170
|
+
const role = new iam.Role(stack, 'MyRole', { assumedBy: new iam.ServicePrincipal('sample') });
|
|
171
|
+
table.grantWrite(role);
|
|
172
|
+
|
|
173
|
+
// Grant the user read and write permissions to the table
|
|
174
|
+
table.grantReadWrite(new iam.User(stack, 'MyUser'));
|
|
175
|
+
|
|
176
|
+
// Grant an account permissions to the table
|
|
177
|
+
table.grantReadWrite(new iam.AccountPrincipal(accountId));
|
|
178
|
+
|
|
179
|
+
// Add custom resource policy statements
|
|
180
|
+
const permissions = new iam.PolicyStatement({
|
|
181
|
+
effect: iam.Effect.ALLOW,
|
|
182
|
+
actions: ['s3tables:*'],
|
|
183
|
+
principals: [ new iam.ServicePrincipal('example.aws.internal') ],
|
|
184
|
+
resources: ['*']
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
table.addToResourcePolicy(permissions);
|
|
188
|
+
```
|
|
189
|
+
|
|
162
190
|
## Coming Soon
|
|
163
191
|
|
|
164
192
|
L2 Construct support for:
|
|
165
193
|
|
|
166
|
-
- Table Policy
|
|
167
194
|
- KMS encryption support for Tables
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2/integ.api-dualstack.ts
CHANGED
|
@@ -4,14 +4,13 @@ import * as cdk from 'aws-cdk-lib';
|
|
|
4
4
|
import * as apigw from 'aws-cdk-lib/aws-apigatewayv2';
|
|
5
5
|
|
|
6
6
|
const app = new cdk.App();
|
|
7
|
-
const stack = new cdk.Stack(app, '
|
|
7
|
+
const stack = new cdk.Stack(app, 'DualStackWebsocketApiStack');
|
|
8
8
|
|
|
9
|
-
new apigw.
|
|
10
|
-
routeSelectionExpression: true,
|
|
9
|
+
new apigw.WebSocketApi(stack, 'WebSocketApi', {
|
|
11
10
|
ipAddressType: apigw.IpAddressType.DUAL_STACK,
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
new IntegTest(app, '
|
|
13
|
+
new IntegTest(app, 'DualStackWebsocketApiInteg', {
|
|
15
14
|
testCases: [stack],
|
|
16
15
|
});
|
|
17
16
|
|
|
@@ -6,11 +6,9 @@ import * as apigw from 'aws-cdk-lib/aws-apigatewayv2';
|
|
|
6
6
|
const app = new cdk.App();
|
|
7
7
|
const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2');
|
|
8
8
|
|
|
9
|
-
new apigw.
|
|
10
|
-
routeSelectionExpression: true,
|
|
11
|
-
});
|
|
9
|
+
new apigw.WebSocketApi(stack, 'WebSocketApi');
|
|
12
10
|
|
|
13
|
-
new IntegTest(app, '
|
|
11
|
+
new IntegTest(app, 'web-socket-api', {
|
|
14
12
|
testCases: [stack],
|
|
15
13
|
});
|
|
16
14
|
|
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
3
2
|
import * as cdk from 'aws-cdk-lib';
|
|
4
|
-
import * as
|
|
5
|
-
import * as apigw from 'aws-cdk-lib/aws-apigateway';
|
|
6
|
-
import * as logs from 'aws-cdk-lib/aws-logs';
|
|
3
|
+
import * as apigw from 'aws-cdk-lib/aws-apigatewayv2';
|
|
7
4
|
|
|
8
5
|
const app = new cdk.App();
|
|
9
|
-
const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2-
|
|
6
|
+
const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2-websocket-stage');
|
|
10
7
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
httpApi,
|
|
8
|
+
const webSocketApi = new apigw.WebSocketApi(stack, 'WebSocketApi');
|
|
9
|
+
new apigw.WebSocketStage(stack, 'WebSocketStage', {
|
|
10
|
+
webSocketApi,
|
|
11
|
+
stageName: 'dev',
|
|
16
12
|
throttle: {
|
|
17
13
|
rateLimit: 1000,
|
|
18
14
|
burstLimit: 1000,
|
|
19
15
|
},
|
|
20
16
|
detailedMetricsEnabled: true,
|
|
21
17
|
description: 'My Stage',
|
|
22
|
-
accessLogSettings: {
|
|
23
|
-
destination: new apigwv2.LogGroupLogDestination(testLogGroup),
|
|
24
|
-
format: apigw.AccessLogFormat.custom(JSON.stringify({
|
|
25
|
-
extendedRequestId: apigw.AccessLogField.contextExtendedRequestId(),
|
|
26
|
-
requestTime: apigw.AccessLogField.contextRequestTime(),
|
|
27
|
-
})),
|
|
28
|
-
},
|
|
29
18
|
});
|
|
30
19
|
|
|
31
|
-
|
|
32
|
-
testCases: [stack],
|
|
33
|
-
});
|
|
20
|
+
app.synth();
|
|
@@ -1,46 +1,53 @@
|
|
|
1
1
|
import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
|
|
2
|
+
import { WebSocketLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
|
2
3
|
import * as iam from 'aws-cdk-lib/aws-iam';
|
|
4
|
+
import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';
|
|
3
5
|
import * as cdk from 'aws-cdk-lib';
|
|
4
|
-
import {
|
|
6
|
+
import { Stack } from 'aws-cdk-lib';
|
|
7
|
+
import * as integ from '@aws-cdk/integ-tests-alpha';
|
|
8
|
+
import { WebSocketIamAuthorizer } from 'aws-cdk-lib/aws-apigatewayv2-authorizers';
|
|
5
9
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
method: apigatewayv2.HttpMethod.GET,
|
|
12
|
-
uri: 'https://www.example.com/',
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const app = new cdk.App();
|
|
10
|
+
const app = new cdk.App({
|
|
11
|
+
postCliContext: {
|
|
12
|
+
'@aws-cdk/aws-lambda:useCdkManagedLogGroup': false,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
18
15
|
const stack = new cdk.Stack(app, 'IntegApiGatewayV2Iam');
|
|
19
16
|
const user = new iam.User(stack, 'User');
|
|
20
17
|
const userAccessKey = new iam.AccessKey(stack, 'UserAccess', {
|
|
21
18
|
user,
|
|
22
19
|
});
|
|
23
20
|
|
|
24
|
-
const
|
|
25
|
-
|
|
21
|
+
const handler = new Function(stack, 'auth-function', {
|
|
22
|
+
runtime: Runtime.NODEJS_18_X,
|
|
23
|
+
code: Code.fromInline('exports.handler = () => {return true}'),
|
|
24
|
+
handler: 'index.handler',
|
|
26
25
|
});
|
|
27
26
|
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const webSocketApi = new apigatewayv2.WebSocketApi(stack, 'WebSocketApi', {
|
|
28
|
+
connectRouteOptions: {
|
|
29
|
+
integration: new WebSocketLambdaIntegration('WebSocketLambdaIntegration', handler),
|
|
30
|
+
authorizer: new WebSocketIamAuthorizer(),
|
|
31
|
+
},
|
|
31
32
|
});
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
integration: new ExampleComIntegration('examplecom'),
|
|
37
|
-
path: '/books/{book}',
|
|
34
|
+
const arn = Stack.of(stack).formatArn({
|
|
35
|
+
service: 'execute-api',
|
|
36
|
+
resource: webSocketApi.apiId,
|
|
38
37
|
});
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
user.attachInlinePolicy(new iam.Policy(stack, 'AllowInvoke', {
|
|
40
|
+
statements: [
|
|
41
|
+
new iam.PolicyStatement({
|
|
42
|
+
actions: ['execute-api:Invoke'],
|
|
43
|
+
effect: iam.Effect.ALLOW,
|
|
44
|
+
resources: [arn],
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
}));
|
|
41
48
|
|
|
42
|
-
new
|
|
43
|
-
|
|
49
|
+
new integ.IntegTest(app, 'ApiGatewayV2WebSocketIamTest', {
|
|
50
|
+
testCases: [stack],
|
|
44
51
|
});
|
|
45
52
|
|
|
46
53
|
new cdk.CfnOutput(stack, 'TESTACCESSKEYID', {
|
|
@@ -55,15 +62,4 @@ new cdk.CfnOutput(stack, 'TESTREGION', {
|
|
|
55
62
|
value: stack.region,
|
|
56
63
|
});
|
|
57
64
|
|
|
58
|
-
|
|
59
|
-
* Stack verification steps:
|
|
60
|
-
* * Get cURL version 7.75.0 or later so you can use the --aws-sigv4 option
|
|
61
|
-
* * Curl <url>/foo without sigv4 and expect a 403
|
|
62
|
-
* * Curl <url>/books/something without sigv4 and expect a 403
|
|
63
|
-
* * Curl <url>/foo with sigv4 from the authorized user and expect 200
|
|
64
|
-
* * Curl <url>/books/something with sigv4 from the authorized user and expect 200
|
|
65
|
-
*
|
|
66
|
-
* Reference:
|
|
67
|
-
* * Using cURL 7.75.0 or later via the official docker image: docker run --rm curlimages/curl -s -o/dev/null -w"%{http_code}" <url>
|
|
68
|
-
* * Args to enable sigv4 with authorized credentials: --user "$TESTACCESSKEYID:$TESTSECRETACCESSKEY" --aws-sigv4 "aws:amz:$TESTREGION:execute-api"
|
|
69
|
-
*/
|
|
65
|
+
app.synth();
|