konokenj.cdk-api-mcp-server 0.49.0__py3-none-any.whl → 0.50.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-agentcore-alpha/README.md +796 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md +116 -29
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-msk-alpha/README.md +8 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/mixins-preview/README.md +16 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.api-with-authorizer-and-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigateway/integ.lambda-api.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.iam.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.lambda.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-authorizers/integ.user-pool.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.add-subroute-integration.ts +7 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.http-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda-proxy.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-apigatewayv2-integrations/integ.lambda.ts +4 -4
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.graphql-lambda-permission.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.js-resolver.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudformation/integ.core-custom-resources-node-18.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudformation/integ.core-custom-resources-service-timeout.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudfront-origins/integ.origin-response-completion-timeout.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-cloudtrail/integ.cloudtrail-data-events-only.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr/README.md +40 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecr/integ.tag-mutability-exclusion.ts +30 -0
- 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.managedinstances-capacity-provider.ts +5 -3
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.managedinstances-no-default-capacity-provider.ts +107 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs-patterns/integ.alb-fargate-service-public-private-switch.ts +45 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb-lambda-multi-value-headers.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb.oidc.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2-actions/integ.cognito.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/README.md +96 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.record-format-conversion-schema.ts +154 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-kinesisfirehose/integ.record-format-conversion.ts +178 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.binary-payload.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.logging-config.ts +8 -8
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.params-and-secrets.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime-management.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtime.inlinecode.ts +0 -7
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.dependencies-pnpm.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.function-exclude-smithy-models.ts +2 -2
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-nodejs/integ.nodejs.build.images.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/integ.subscriptionfilter.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-data-api-to-imported-cluster.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-rds/integ.cluster-data-api.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-s3-deployment/integ.bucket-deployment-data.ts +4 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/README.md +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.call-aws-service-cross-region-lambda.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions-tasks/integ.invoke-json-path.ts +102 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-synthetics/integ.canary.ts +2 -0
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.aws-custom-resource.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.custom-resource-config-lambda-node-runtime.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/custom-resources/integ.invoke-function-payload.ts +1 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +43 -1
- cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/README.md +32 -1
- {konokenj_cdk_api_mcp_server-0.49.0.dist-info → konokenj_cdk_api_mcp_server-0.50.0.dist-info}/METADATA +2 -2
- {konokenj_cdk_api_mcp_server-0.49.0.dist-info → konokenj_cdk_api_mcp_server-0.50.0.dist-info}/RECORD +58 -50
- {konokenj_cdk_api_mcp_server-0.49.0.dist-info → konokenj_cdk_api_mcp_server-0.50.0.dist-info}/WHEEL +0 -0
- {konokenj_cdk_api_mcp_server-0.49.0.dist-info → konokenj_cdk_api_mcp_server-0.50.0.dist-info}/entry_points.txt +0 -0
- {konokenj_cdk_api_mcp_server-0.49.0.dist-info → konokenj_cdk_api_mcp_server-0.50.0.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-

|
|
7
7
|
|
|
8
|
-
> The APIs of higher level constructs in this module are
|
|
9
|
-
>
|
|
10
|
-
> not subject to
|
|
11
|
-
> announced in
|
|
12
|
-
> your source code when upgrading to a newer version of this package.
|
|
8
|
+
> The APIs of higher level constructs in this module are in **developer preview** before they
|
|
9
|
+
> become stable. We will only make breaking changes to address unforeseen API issues. Therefore,
|
|
10
|
+
> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes
|
|
11
|
+
> will be announced in release notes. This means that while you may use them, you may need to
|
|
12
|
+
> update your source code when upgrading to a newer version of this package.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -39,33 +39,88 @@ const cluster = new eks.Cluster(this, 'hello-eks', {
|
|
|
39
39
|
|
|
40
40
|
## Architecture
|
|
41
41
|
|
|
42
|
-
```text
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
```text +-----------------+
|
|
43
|
+
kubectl | |
|
|
44
|
+
+------------>| Kubectl Handler |
|
|
45
|
+
| | (Optional) |
|
|
46
|
+
| +-----------------+
|
|
47
|
+
+-------------------------------------+-------------------------------------+
|
|
48
|
+
| EKS Cluster (Auto Mode) |
|
|
49
|
+
| AWS::EKS::Cluster |
|
|
50
|
+
| |
|
|
51
|
+
| +---------------------------------------------------------------------+ |
|
|
52
|
+
| | Auto Mode Compute (Managed by EKS) (Default) | |
|
|
53
|
+
| | | |
|
|
54
|
+
| | - Automatically provisions EC2 instances | |
|
|
55
|
+
| | - Auto scaling based on pod requirements | |
|
|
56
|
+
| | - No manual node group configuration needed | |
|
|
57
|
+
| | | |
|
|
58
|
+
| +---------------------------------------------------------------------+ |
|
|
59
|
+
| |
|
|
60
|
+
+---------------------------------------------------------------------------+
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
In a nutshell:
|
|
62
64
|
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
cluster
|
|
65
|
+
- **[Auto Mode](#eks-auto-mode)** (Default) – The fully managed capacity mode in EKS.
|
|
66
|
+
EKS automatically provisions and scales EC2 capacity based on pod requirements.
|
|
67
|
+
It manages internal *system* and *general-purpose* NodePools, handles networking and storage setup, and removes the need for user-managed node groups or Auto Scaling Groups.
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
const cluster = new eks.Cluster(this, 'AutoModeCluster', {
|
|
71
|
+
version: eks.KubernetesVersion.V1_33,
|
|
72
|
+
// Auto Mode is enabled by default
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- **[Managed Node Groups](#managed-node-groups)** – The semi-managed capacity mode.
|
|
77
|
+
EKS provisions and manages EC2 nodes on your behalf but you configure the instance types, scaling ranges, and update strategy.
|
|
78
|
+
AWS handles node health, draining, and rolling updates while you retain control over scaling and cost optimization.
|
|
79
|
+
|
|
80
|
+
You can also define *Fargate Profiles* that determine which pods or namespaces run on Fargate infrastructure.
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
const cluster = new eks.Cluster(this, 'ManagedNodeCluster', {
|
|
84
|
+
version: eks.KubernetesVersion.V1_33,
|
|
85
|
+
defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// Add a Fargate Profile for specific workloads (e.g., default namespace)
|
|
89
|
+
cluster.addFargateProfile('FargateProfile', {
|
|
90
|
+
selectors: [
|
|
91
|
+
{ namespace: 'default' }, // Run pods in 'default' on Fargate
|
|
92
|
+
],
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
- **[Fargate Mode](#fargate-profiles)** – The Fargate capacity mode.
|
|
97
|
+
EKS runs your pods directly on AWS Fargate without provisioning EC2 nodes.
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const cluster = new eks.FargateCluster(this, 'FargateCluster', {
|
|
101
|
+
version: eks.KubernetesVersion.V1_33,
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- **[Self-Managed Nodes](#self-managed-capacity)** – The fully manual capacity mode.
|
|
106
|
+
You create and manage EC2 instances (via an Auto Scaling Group) and connect them to the cluster manually.
|
|
107
|
+
This provides maximum flexibility for custom AMIs or configurations but also the highest operational overhead.
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
const cluster = new eks.Cluster(this, 'SelfManagedCluster', {
|
|
111
|
+
version: eks.KubernetesVersion.V1_33,
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// Add self-managed Auto Scaling Group
|
|
115
|
+
cluster.addAutoScalingGroupCapacity('self-managed-asg', {
|
|
116
|
+
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
|
|
117
|
+
minCapacity: 1,
|
|
118
|
+
maxCapacity: 5,
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- **[Kubectl Handler](#kubectl-support) (Optional)** – A Lambda-backed custom resource created by the AWS CDK to execute `kubectl` commands (like `apply` or `patch`) during deployment.
|
|
123
|
+
Regardless of the capacity mode, this handler may still be created to apply Kubernetes manifests as part of CDK provisioning.
|
|
69
124
|
|
|
70
125
|
## Provisioning cluster
|
|
71
126
|
|
|
@@ -327,6 +382,38 @@ pods running on Fargate. For ingress, we recommend that you use the [ALB Ingress
|
|
|
327
382
|
Controller](https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html)
|
|
328
383
|
on Amazon EKS (minimum version v1.1.4).
|
|
329
384
|
|
|
385
|
+
### Self-managed capacity
|
|
386
|
+
|
|
387
|
+
Self-managed capacity gives you the most control over your worker nodes by allowing you to create and manage your own EC2 Auto Scaling Groups. This approach provides maximum flexibility for custom AMIs, instance configurations, and scaling policies, but requires more operational overhead.
|
|
388
|
+
|
|
389
|
+
You can add self-managed capacity to any cluster using the `addAutoScalingGroupCapacity` method:
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
const cluster = new eks.Cluster(this, 'Cluster', {
|
|
393
|
+
version: eks.KubernetesVersion.V1_33,
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
cluster.addAutoScalingGroupCapacity('self-managed-nodes', {
|
|
397
|
+
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
|
|
398
|
+
minCapacity: 1,
|
|
399
|
+
maxCapacity: 10,
|
|
400
|
+
desiredCapacity: 3,
|
|
401
|
+
});
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
You can specify custom subnets for the Auto Scaling Group:
|
|
405
|
+
|
|
406
|
+
```ts
|
|
407
|
+
declare const vpc: ec2.Vpc;
|
|
408
|
+
declare const cluster: eks.Cluster;
|
|
409
|
+
|
|
410
|
+
cluster.addAutoScalingGroupCapacity('custom-subnet-nodes', {
|
|
411
|
+
vpcSubnets: { subnets: vpc.privateSubnets },
|
|
412
|
+
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
|
|
413
|
+
minCapacity: 2,
|
|
414
|
+
});
|
|
415
|
+
```
|
|
416
|
+
|
|
330
417
|
### Endpoint Access
|
|
331
418
|
|
|
332
419
|
When you create a new cluster, Amazon EKS creates an endpoint for the managed Kubernetes API server that you use to communicate with your cluster (using Kubernetes management tools such as `kubectl`)
|
|
@@ -23,7 +23,7 @@ The following example creates an MSK Cluster.
|
|
|
23
23
|
declare const vpc: ec2.Vpc;
|
|
24
24
|
const cluster = new msk.Cluster(this, 'Cluster', {
|
|
25
25
|
clusterName: 'myCluster',
|
|
26
|
-
kafkaVersion: msk.KafkaVersion.
|
|
26
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
27
27
|
vpc,
|
|
28
28
|
});
|
|
29
29
|
```
|
|
@@ -36,7 +36,7 @@ To control who can access the Cluster, use the `.connections` attribute. For a l
|
|
|
36
36
|
declare const vpc: ec2.Vpc;
|
|
37
37
|
const cluster = new msk.Cluster(this, 'Cluster', {
|
|
38
38
|
clusterName: 'myCluster',
|
|
39
|
-
kafkaVersion: msk.KafkaVersion.
|
|
39
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
40
40
|
vpc,
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -88,7 +88,7 @@ import * as acmpca from 'aws-cdk-lib/aws-acmpca';
|
|
|
88
88
|
declare const vpc: ec2.Vpc;
|
|
89
89
|
const cluster = new msk.Cluster(this, 'Cluster', {
|
|
90
90
|
clusterName: 'myCluster',
|
|
91
|
-
kafkaVersion: msk.KafkaVersion.
|
|
91
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
92
92
|
vpc,
|
|
93
93
|
encryptionInTransit: {
|
|
94
94
|
clientBroker: msk.ClientBrokerEncryption.TLS,
|
|
@@ -113,7 +113,7 @@ Enable client authentication with [SASL/SCRAM](https://docs.aws.amazon.com/msk/l
|
|
|
113
113
|
declare const vpc: ec2.Vpc;
|
|
114
114
|
const cluster = new msk.Cluster(this, 'cluster', {
|
|
115
115
|
clusterName: 'myCluster',
|
|
116
|
-
kafkaVersion: msk.KafkaVersion.
|
|
116
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
117
117
|
vpc,
|
|
118
118
|
encryptionInTransit: {
|
|
119
119
|
clientBroker: msk.ClientBrokerEncryption.TLS,
|
|
@@ -132,7 +132,7 @@ Enable client authentication with [IAM](https://docs.aws.amazon.com/msk/latest/d
|
|
|
132
132
|
declare const vpc: ec2.Vpc;
|
|
133
133
|
const cluster = new msk.Cluster(this, 'cluster', {
|
|
134
134
|
clusterName: 'myCluster',
|
|
135
|
-
kafkaVersion: msk.KafkaVersion.
|
|
135
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
136
136
|
vpc,
|
|
137
137
|
encryptionInTransit: {
|
|
138
138
|
clientBroker: msk.ClientBrokerEncryption.TLS,
|
|
@@ -155,7 +155,7 @@ import * as acmpca from 'aws-cdk-lib/aws-acmpca';
|
|
|
155
155
|
declare const vpc: ec2.Vpc;
|
|
156
156
|
const cluster = new msk.Cluster(this, 'Cluster', {
|
|
157
157
|
clusterName: 'myCluster',
|
|
158
|
-
kafkaVersion: msk.KafkaVersion.
|
|
158
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
159
159
|
vpc,
|
|
160
160
|
encryptionInTransit: {
|
|
161
161
|
clientBroker: msk.ClientBrokerEncryption.TLS,
|
|
@@ -186,7 +186,7 @@ declare const vpc: ec2.Vpc;
|
|
|
186
186
|
declare const bucket: s3.IBucket;
|
|
187
187
|
const cluster = new msk.Cluster(this, 'cluster', {
|
|
188
188
|
clusterName: 'myCluster',
|
|
189
|
-
kafkaVersion: msk.KafkaVersion.
|
|
189
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
190
190
|
vpc,
|
|
191
191
|
logging: {
|
|
192
192
|
s3: {
|
|
@@ -226,7 +226,7 @@ declare const bucket: s3.IBucket;
|
|
|
226
226
|
|
|
227
227
|
const cluster = new msk.Cluster(this, 'cluster', {
|
|
228
228
|
clusterName: 'myCluster',
|
|
229
|
-
kafkaVersion: msk.KafkaVersion.
|
|
229
|
+
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
|
|
230
230
|
vpc,
|
|
231
231
|
storageMode: msk.StorageMode.TIERED,
|
|
232
232
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# CDK Mixins: Composable Abstractions for AWS Resources
|
|
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. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<!--END STABILITY BANNER-->
|
|
14
|
+
|
|
15
|
+
Implementation of the CDK Mixins proposal.
|
|
16
|
+
See <https://github.com/aws/aws-cdk-rfcs/pull/824> for details.
|
|
@@ -42,7 +42,7 @@ const sendResource = root.addResource('InitiateAction');
|
|
|
42
42
|
const myfunc = new lambda.Function(stack, 'lambda-s3', {
|
|
43
43
|
code: lambda.AssetCode.fromAsset(path.join(__dirname, 'assets')),
|
|
44
44
|
handler: 'index.handler',
|
|
45
|
-
runtime: lambda.Runtime.
|
|
45
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
const sendLambdaIntegration = new agw.LambdaIntegration(myfunc);
|
|
@@ -19,7 +19,7 @@ const userAccessKey = new iam.AccessKey(stack, 'UserAccess', {
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
const handler = new Function(stack, 'auth-function', {
|
|
22
|
-
runtime: Runtime.
|
|
22
|
+
runtime: Runtime.NODEJS_20_X,
|
|
23
23
|
code: Code.fromInline('exports.handler = () => {return true}'),
|
|
24
24
|
handler: 'index.handler',
|
|
25
25
|
});
|
|
@@ -20,7 +20,7 @@ const app = new App({
|
|
|
20
20
|
const stack = new Stack(app, 'AuthorizerInteg');
|
|
21
21
|
|
|
22
22
|
const authHandler = new lambda.Function(stack, 'auth-function', {
|
|
23
|
-
runtime: lambda.Runtime.
|
|
23
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
24
24
|
handler: 'index.handler',
|
|
25
25
|
code: lambda.Code.fromAsset(path.join(__dirname, '..', 'auth-handler'), { exclude: ['*.ts'] }),
|
|
26
26
|
});
|
|
@@ -43,7 +43,7 @@ const httpApiWithDefaultAuthorizer = new HttpApi(stack, 'MyHttpApiWithDefaultAut
|
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
const handler = new lambda.Function(stack, 'lambda', {
|
|
46
|
-
runtime: lambda.Runtime.
|
|
46
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
47
47
|
handler: 'index.handler',
|
|
48
48
|
code: lambda.AssetCode.fromAsset(path.join(__dirname, '..', 'integ.lambda.handler'), { exclude: ['*.ts'] }),
|
|
49
49
|
});
|
|
@@ -33,7 +33,7 @@ const httpApiWithDefaultAuthorizer = new HttpApi(stack, 'MyHttpApiWithDefaultAut
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
const handler = new lambda.Function(stack, 'lambda', {
|
|
36
|
-
runtime: lambda.Runtime.
|
|
36
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
37
37
|
handler: 'index.handler',
|
|
38
38
|
code: lambda.AssetCode.fromAsset(path.join(__dirname, '..', 'integ.user-pool.handler'), { exclude: ['*.ts'] }),
|
|
39
39
|
});
|
|
@@ -15,7 +15,7 @@ const httpApi = new HttpApi(stack, 'test-apigwv2-add-subroute-integration');
|
|
|
15
15
|
|
|
16
16
|
// Regular Lambda Function
|
|
17
17
|
const lambdaHandler = new lambda.Function(stack, 'first-lambda-function', {
|
|
18
|
-
runtime: lambda.Runtime.
|
|
18
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
19
19
|
handler: 'index.handler',
|
|
20
20
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: \'success-hit-first-lambda\' }; };'),
|
|
21
21
|
});
|
|
@@ -23,7 +23,7 @@ const lambdaHandlerIntegration = new HttpLambdaIntegration('my-lambda-integratio
|
|
|
23
23
|
|
|
24
24
|
// Lambda created with Function.fromFunctionAttributes()
|
|
25
25
|
const secondLambdaHandler = new lambda.Function(stack, 'second-lambda-function', {
|
|
26
|
-
runtime: lambda.Runtime.
|
|
26
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
27
27
|
handler: 'index.handler',
|
|
28
28
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: \'success-hit-second-lambda\' }; };'),
|
|
29
29
|
});
|
|
@@ -35,8 +35,8 @@ const lambdaFromFunctionAttributesIntegration = new HttpLambdaIntegration('my-re
|
|
|
35
35
|
|
|
36
36
|
// Lambda created with Function.fromFunctionName()
|
|
37
37
|
const thirdLambdaName = 'third-lambda-function';
|
|
38
|
-
new lambda.Function(stack, thirdLambdaName, {
|
|
39
|
-
runtime: lambda.Runtime.
|
|
38
|
+
const thirdLambdaFunction = new lambda.Function(stack, thirdLambdaName, {
|
|
39
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
40
40
|
handler: 'index.handler',
|
|
41
41
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: \'success-hit-third-lambda\' }; };'),
|
|
42
42
|
functionName: thirdLambdaName,
|
|
@@ -83,6 +83,9 @@ httpApi.addRoutes({
|
|
|
83
83
|
integration: lambdaFromFunctionNameIntegration,
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
httpApi.node.addDependency(secondLambdaHandler);
|
|
87
|
+
httpApi.node.addDependency(thirdLambdaFunction);
|
|
88
|
+
|
|
86
89
|
// Integ Test Assertions
|
|
87
90
|
const integ = new IntegTest(app, 'Integ', { testCases: [stack] });
|
|
88
91
|
|
|
@@ -29,7 +29,7 @@ new CfnOutput(stack, 'Endpoint', {
|
|
|
29
29
|
|
|
30
30
|
function lambdaProxyEndpoint(s: Stack): HttpApi {
|
|
31
31
|
const handler = new lambda.Function(s, 'AlwaysSuccess', {
|
|
32
|
-
runtime: lambda.Runtime.
|
|
32
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
33
33
|
handler: 'index.handler',
|
|
34
34
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: "success" }; };'),
|
|
35
35
|
});
|
|
@@ -17,7 +17,7 @@ const app = new App({
|
|
|
17
17
|
const stack = new Stack(app, 'integ-lambda-proxy');
|
|
18
18
|
|
|
19
19
|
const handler = new lambda.Function(stack, 'AlwaysSuccess', {
|
|
20
|
-
runtime: lambda.Runtime.
|
|
20
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
21
21
|
handler: 'index.handler',
|
|
22
22
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { return { statusCode: 200, body: "success" }; };'),
|
|
23
23
|
});
|
|
@@ -19,25 +19,25 @@ const app = new App({
|
|
|
19
19
|
const stack = new Stack(app, 'WebSocketApiInteg');
|
|
20
20
|
|
|
21
21
|
const connectHandler = new lambda.Function(stack, 'ConnectHandler', {
|
|
22
|
-
runtime: lambda.Runtime.
|
|
22
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
23
23
|
handler: 'index.handler',
|
|
24
24
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "connected" }; };'),
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
const disconnetHandler = new lambda.Function(stack, 'DisconnectHandler', {
|
|
28
|
-
runtime: lambda.Runtime.
|
|
28
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
29
29
|
handler: 'index.handler',
|
|
30
30
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "disconnected" }; };'),
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const defaultHandler = new lambda.Function(stack, 'DefaultHandler', {
|
|
34
|
-
runtime: lambda.Runtime.
|
|
34
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
35
35
|
handler: 'index.handler',
|
|
36
36
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "default" }; };'),
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
const messageHandler = new lambda.Function(stack, 'MessageHandler', {
|
|
40
|
-
runtime: lambda.Runtime.
|
|
40
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
41
41
|
handler: 'index.handler',
|
|
42
42
|
code: new lambda.InlineCode('exports.handler = async function(event, context) { console.log(event); return { statusCode: 200, body: "received" }; };'),
|
|
43
43
|
});
|
|
@@ -16,7 +16,7 @@ const app = new cdk.App({
|
|
|
16
16
|
const stack = new cdk.Stack(app, 'aws-graphql-lambda-permissions');
|
|
17
17
|
|
|
18
18
|
const authorizer = new lambda.Function(stack, 'AuthorizerFunction', {
|
|
19
|
-
runtime: lambda.Runtime.
|
|
19
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
20
20
|
code: lambda.Code.fromInline(`
|
|
21
21
|
exports.handler = async (event) => {
|
|
22
22
|
console.log("Authorization event:", JSON.stringify(event));
|
cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appsync/integ.js-resolver.ts
CHANGED
|
@@ -64,7 +64,7 @@ const integ = new IntegTest(app, 'JsResolverIntegTest', { testCases: [stack] });
|
|
|
64
64
|
const invoke = new lambda.Function(stack, 'InvokeApi', {
|
|
65
65
|
code: lambda.Code.fromAsset(path.join(__dirname, 'integ-assets', 'js-resolver-assertion')),
|
|
66
66
|
handler: 'index.handler',
|
|
67
|
-
runtime: lambda.Runtime.
|
|
67
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
const addTestInvoke = integ.assertions.invokeFunction({
|
|
@@ -21,7 +21,7 @@ class TestStack extends Stack {
|
|
|
21
21
|
|
|
22
22
|
const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, {
|
|
23
23
|
codeDirectory: `${__dirname}/core-custom-resource-provider-fixture`,
|
|
24
|
-
runtime: CustomResourceProviderRuntime.
|
|
24
|
+
runtime: CustomResourceProviderRuntime.NODEJS_20_X,
|
|
25
25
|
description: 'veni vidi vici',
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -16,7 +16,7 @@ class TestStack extends Stack {
|
|
|
16
16
|
|
|
17
17
|
const serviceToken = CustomResourceProvider.getOrCreate(this, resourceType, {
|
|
18
18
|
codeDirectory: `${__dirname}/core-custom-resource-provider-fixture`,
|
|
19
|
-
runtime: CustomResourceProviderRuntime.
|
|
19
|
+
runtime: CustomResourceProviderRuntime.NODEJS_20_X,
|
|
20
20
|
description: 'veni vidi vici',
|
|
21
21
|
});
|
|
22
22
|
|
|
@@ -13,7 +13,7 @@ const httpOrigin = new origins.HttpOrigin('example.com', {
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
const fn = new lambda.Function(stack, 'Function', {
|
|
16
|
-
runtime: lambda.Runtime.
|
|
16
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
17
17
|
handler: 'index.handler',
|
|
18
18
|
code: lambda.Code.fromInline('exports.handler = async () => ({ statusCode: 200, body: "Hello from Lambda!" });'),
|
|
19
19
|
});
|
|
@@ -13,7 +13,7 @@ const stack = new cdk.Stack(app, 'integ-cloudtrail-data-events');
|
|
|
13
13
|
|
|
14
14
|
const bucket = new s3.Bucket(stack, 'Bucket', { removalPolicy: cdk.RemovalPolicy.DESTROY });
|
|
15
15
|
const lambdaFunction = new lambda.Function(stack, 'LambdaFunction', {
|
|
16
|
-
runtime: lambda.Runtime.
|
|
16
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
17
17
|
handler: 'hello.handler',
|
|
18
18
|
code: lambda.Code.fromInline('exports.handler = {}'),
|
|
19
19
|
});
|
|
@@ -121,12 +121,51 @@ By using these methods, you can grant specific operational permissions on the EC
|
|
|
121
121
|
|
|
122
122
|
### Image tag immutability
|
|
123
123
|
|
|
124
|
-
You can set tag immutability on images in
|
|
124
|
+
You can set tag immutability on images in your repository using the `imageTagMutability` construct prop.
|
|
125
125
|
|
|
126
126
|
```ts
|
|
127
127
|
new ecr.Repository(this, 'Repo', { imageTagMutability: ecr.TagMutability.IMMUTABLE });
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
+
#### Image tag mutability with exclusion filters
|
|
131
|
+
|
|
132
|
+
ECR supports more granular control over image tag mutability by allowing you to specify exclusion filters. This enables you to make your repository immutable while allowing specific tag patterns to remain mutable (or vice versa).
|
|
133
|
+
|
|
134
|
+
There are two new mutability options that work with exclusion filters:
|
|
135
|
+
|
|
136
|
+
- `MUTABLE_WITH_EXCLUSION`: Tags are mutable by default, except those matching the exclusion filters
|
|
137
|
+
- `IMMUTABLE_WITH_EXCLUSION`: Tags are immutable by default, except those matching the exclusion filters
|
|
138
|
+
|
|
139
|
+
Use `ImageTagMutabilityExclusionFilter.wildcard()` to create filters with wildcard patterns:
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
// Make all tags immutable except for those starting with 'dev-' or 'test-'
|
|
143
|
+
new ecr.Repository(this, 'Repo', {
|
|
144
|
+
imageTagMutability: ecr.TagMutability.IMMUTABLE_WITH_EXCLUSION,
|
|
145
|
+
imageTagMutabilityExclusionFilters: [
|
|
146
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('dev-*'),
|
|
147
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('test-*'),
|
|
148
|
+
],
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
// Make all tags mutable except for production releases
|
|
154
|
+
new ecr.Repository(this, 'Repo', {
|
|
155
|
+
imageTagMutability: ecr.TagMutability.MUTABLE_WITH_EXCLUSION,
|
|
156
|
+
imageTagMutabilityExclusionFilters: [
|
|
157
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('prod-*'),
|
|
158
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('release-v*'),
|
|
159
|
+
],
|
|
160
|
+
});
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
##### Exclusion filter pattern rules
|
|
164
|
+
|
|
165
|
+
- Patterns can contain alphanumeric characters, dots (.), underscores (_), hyphens (-), and asterisks (*) as wildcards
|
|
166
|
+
- Maximum pattern length is 128 characters
|
|
167
|
+
- You can specify up to 5 exclusion filters per repository
|
|
168
|
+
|
|
130
169
|
### Encryption
|
|
131
170
|
|
|
132
171
|
By default, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts your data at rest using an AES-256 encryption algorithm. For more control over the encryption for your Amazon ECR repositories, you can use server-side encryption with KMS keys stored in AWS Key Management Service (AWS KMS). Read more about this feature in the [ECR Developer Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/encryption-at-rest.html).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as cdk from 'aws-cdk-lib';
|
|
2
|
+
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
|
|
3
|
+
import * as ecr from 'aws-cdk-lib/aws-ecr';
|
|
4
|
+
|
|
5
|
+
const app = new cdk.App();
|
|
6
|
+
const stack = new cdk.Stack(app, 'aws-ecr-tag-mutability-exclusion-stack');
|
|
7
|
+
|
|
8
|
+
new ecr.Repository(stack, 'ImmutableRepoWithExclusions', {
|
|
9
|
+
imageTagMutability: ecr.TagMutability.IMMUTABLE_WITH_EXCLUSION,
|
|
10
|
+
imageTagMutabilityExclusionFilters: [
|
|
11
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('dev-*'),
|
|
12
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('test-*'),
|
|
13
|
+
],
|
|
14
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
15
|
+
emptyOnDelete: true,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
new ecr.Repository(stack, 'MutableRepoWithExclusions', {
|
|
19
|
+
imageTagMutability: ecr.TagMutability.MUTABLE_WITH_EXCLUSION,
|
|
20
|
+
imageTagMutabilityExclusionFilters: [
|
|
21
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('prod-*'),
|
|
22
|
+
ecr.ImageTagMutabilityExclusionFilter.wildcard('release-v*'),
|
|
23
|
+
],
|
|
24
|
+
removalPolicy: cdk.RemovalPolicy.DESTROY,
|
|
25
|
+
emptyOnDelete: true,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
new IntegTest(app, 'cdk-ecr-tag-mutability-exclusion-test', {
|
|
29
|
+
testCases: [stack],
|
|
30
|
+
});
|
|
@@ -1687,6 +1687,9 @@ const miCapacityProvider = new ecs.ManagedInstancesCapacityProvider(this, 'MICap
|
|
|
1687
1687
|
propagateTags: ecs.PropagateManagedInstancesTags.CAPACITY_PROVIDER,
|
|
1688
1688
|
});
|
|
1689
1689
|
|
|
1690
|
+
// Optionally configure security group rules using IConnectable interface
|
|
1691
|
+
miCapacityProvider.connections.allowFrom(ec2.Peer.ipv4(vpc.vpcCidrBlock), ec2.Port.tcp(80));
|
|
1692
|
+
|
|
1690
1693
|
// Add the capacity provider to the cluster
|
|
1691
1694
|
cluster.addManagedInstancesCapacityProvider(miCapacityProvider);
|
|
1692
1695
|
|
|
@@ -24,7 +24,7 @@ const infrastructureRole = new iam.Role(stack, 'InfrastructureRole', {
|
|
|
24
24
|
roleName: 'AmazonECSInfrastructureRoleForOmakase',
|
|
25
25
|
assumedBy: new iam.ServicePrincipal('ecs.amazonaws.com'),
|
|
26
26
|
managedPolicies: [
|
|
27
|
-
iam.ManagedPolicy.fromAwsManagedPolicyName('
|
|
27
|
+
iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonECSInfrastructureRolePolicyForManagedInstances'),
|
|
28
28
|
],
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ const instanceRole = new iam.Role(stack, 'InstanceRole', {
|
|
|
32
32
|
roleName: 'AmazonECSInstanceRoleForOmakase',
|
|
33
33
|
assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
|
|
34
34
|
managedPolicies: [
|
|
35
|
-
iam.ManagedPolicy.fromAwsManagedPolicyName('
|
|
35
|
+
iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonECSInstanceRolePolicyForManagedInstances'),
|
|
36
36
|
],
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -63,6 +63,9 @@ const miCapacityProvider = new ecs.ManagedInstancesCapacityProvider(stack, 'Mana
|
|
|
63
63
|
},
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
+
// Configure security group rules using IConnectable interface
|
|
67
|
+
miCapacityProvider.connections.allowFrom(ec2.Peer.ipv4(vpc.vpcCidrBlock), ec2.Port.tcp(80));
|
|
68
|
+
|
|
66
69
|
// Add FMI capacity provider to cluster
|
|
67
70
|
cluster.addManagedInstancesCapacityProvider(miCapacityProvider);
|
|
68
71
|
cluster.addDefaultCapacityProviderStrategy([
|
|
@@ -106,7 +109,6 @@ new ecs.FargateService(stack, 'ManagedInstancesService', {
|
|
|
106
109
|
|
|
107
110
|
new integ.IntegTest(app, 'ManagedInstancesCapacityProviders', {
|
|
108
111
|
testCases: [stack],
|
|
109
|
-
regions: ['us-west-2'],
|
|
110
112
|
});
|
|
111
113
|
|
|
112
114
|
app.synth();
|