konokenj.cdk-api-mcp-server 0.70.0__py3-none-any.whl → 0.72.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.
Files changed (30) hide show
  1. cdk_api_mcp_server/__about__.py +1 -1
  2. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-bedrock-agentcore-alpha/README.md +275 -14
  3. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-eks-v2-alpha/README.md +195 -0
  4. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-elasticache-alpha/README.md +1 -1
  5. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-sagemaker-alpha/README.md +25 -0
  6. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/mixins-preview/README.md +23 -4
  7. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/README.md/README.md +2 -0
  8. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-batch/README.md +54 -34
  9. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-bedrock/README.md +2 -3
  10. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-bedrockagentcore/README.md +24 -0
  11. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ec2/README.md +1 -1
  12. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/README.md +3 -0
  13. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-ecs/integ.managedinstances-capacity-provider.ts +1 -0
  14. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/README.md +108 -2
  15. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-cluster-native-oidc.ts +49 -0
  16. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-cluster.ts +1 -0
  17. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-eks/integ.eks-oidc-provider.ts +19 -0
  18. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-iam/README.md +14 -11
  19. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-event-sources/README.md +76 -3
  20. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-event-sources/integ.kafka-observability.ts +90 -0
  21. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-logs/README.md +2 -2
  22. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-sns/README.md +2 -2
  23. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/core/integ.nested-stack-suppress-template-indentation.ts +29 -0
  24. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +25 -0
  25. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/pipelines/ORIGINAL_API.md +1 -1
  26. {konokenj_cdk_api_mcp_server-0.70.0.dist-info → konokenj_cdk_api_mcp_server-0.72.0.dist-info}/METADATA +2 -2
  27. {konokenj_cdk_api_mcp_server-0.70.0.dist-info → konokenj_cdk_api_mcp_server-0.72.0.dist-info}/RECORD +30 -26
  28. {konokenj_cdk_api_mcp_server-0.70.0.dist-info → konokenj_cdk_api_mcp_server-0.72.0.dist-info}/WHEEL +0 -0
  29. {konokenj_cdk_api_mcp_server-0.70.0.dist-info → konokenj_cdk_api_mcp_server-0.72.0.dist-info}/entry_points.txt +0 -0
  30. {konokenj_cdk_api_mcp_server-0.70.0.dist-info → konokenj_cdk_api_mcp_server-0.72.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -0,0 +1,49 @@
1
+ /// !cdk-integ pragma:disable-update-workflow
2
+ import { App, Stack, StackProps } from 'aws-cdk-lib';
3
+ import * as integ from '@aws-cdk/integ-tests-alpha';
4
+ import * as eks from 'aws-cdk-lib/aws-eks';
5
+ import { EKS_USE_NATIVE_OIDC_PROVIDER } from 'aws-cdk-lib/cx-api';
6
+ import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
7
+
8
+ class EksClusterNativeOidcStack extends Stack {
9
+ constructor(scope: App, id: string, props?: StackProps) {
10
+ super(scope, id, props);
11
+
12
+ const cluster = new eks.Cluster(this, 'Cluster', {
13
+ ...getClusterVersionConfig(this, eks.KubernetesVersion.V1_32),
14
+
15
+ });
16
+
17
+ /**
18
+ * ServiceAccount and AlbController are added to verify that OIDC provider is created and
19
+ * can be used to create IAM roles for service accounts.
20
+ */
21
+
22
+ new eks.ServiceAccount(this, 'ServiceAccount', {
23
+ cluster: cluster,
24
+ name: 'test-service-account',
25
+ namespace: 'default',
26
+ });
27
+ new eks.AlbController(this, 'AlbController', {
28
+ cluster: cluster,
29
+ version: eks.AlbControllerVersion.V2_8_2,
30
+ });
31
+ }
32
+ }
33
+
34
+ const app = new App({
35
+ postCliContext: {
36
+ [EKS_USE_NATIVE_OIDC_PROVIDER]: true,
37
+ },
38
+ });
39
+
40
+ const stack = new EksClusterNativeOidcStack(app, 'aws-cdk-eks-cluster-native-oidc', {
41
+ env: { region: 'us-east-1' },
42
+ });
43
+
44
+ new integ.IntegTest(app, 'aws-cdk-eks-cluster-native-oidc-integ', {
45
+ testCases: [stack],
46
+ diffAssets: false,
47
+ });
48
+
49
+ app.synth();
@@ -105,6 +105,7 @@ class EksClusterStack extends Stack {
105
105
  private assertServiceAccount() {
106
106
  // add a service account connected to a IAM role
107
107
  this.cluster.addServiceAccount('MyServiceAccount');
108
+ this.cluster.addServiceAccount('MyServiceAccountWithOverwrite', { overwriteServiceAccount: true });
108
109
  }
109
110
 
110
111
  private assertExtendedServiceAccount() {
@@ -2,6 +2,7 @@ import { App, Stack } from 'aws-cdk-lib';
2
2
  import * as integ from '@aws-cdk/integ-tests-alpha';
3
3
  import * as eks from 'aws-cdk-lib/aws-eks';
4
4
  import { IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS } from 'aws-cdk-lib/cx-api';
5
+ import { getClusterVersionConfig } from './integ-tests-kubernetes-version';
5
6
 
6
7
  const app = new App({
7
8
  postCliContext: {
@@ -10,10 +11,28 @@ const app = new App({
10
11
  });
11
12
  const stack = new Stack(app, 'aws-eks-oidc-provider-test');
12
13
 
14
+ // OpenIdConnectProvider uses a custom resource that only needs to extract SSL certificate
15
+ // thumbprints via TLS connection. It works with fake cluster IDs (like test2) because
16
+ // oidc.eks.us-east-1.amazonaws.com is a real AWS server with valid SSL certificates.
17
+ // The Lambda doesn't validate OIDC configuration, only retrieves thumbprints when
18
+ // the IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS flag is false.
13
19
  new eks.OpenIdConnectProvider(stack, 'NoClientsNoThumbprint', {
14
20
  url: `https://oidc.eks.${Stack.of(stack).region}.amazonaws.com/id/test2`,
15
21
  });
16
22
 
23
+ const cluster = new eks.Cluster(stack, 'Cluster', {
24
+ ...getClusterVersionConfig(stack, eks.KubernetesVersion.V1_32),
25
+ });
26
+ // OidcProviderNative uses the native AWS::IAM::OIDCProvider CloudFormation resource
27
+ // which validates OIDC providers by fetching /.well-known/openid-configuration.
28
+ // Fake cluster IDs return 404 for this endpoint, causing validation to fail.
29
+ // eks.OidcProviderNative doesn't expose thumbprints property (unlike iam.OidcProviderNative)
30
+ // as there is no use case for using an invalid OIDC issuer URL,
31
+ // so we must use a real cluster URL for CloudFormation to successfully validate.
32
+ new eks.OidcProviderNative(stack, 'OidcProviderNative', {
33
+ url: cluster.clusterOpenIdConnectIssuerUrl,
34
+ });
35
+
17
36
  new integ.IntegTest(app, 'aws-cdk-eks-oidc-provider', {
18
37
  testCases: [stack],
19
38
  });
@@ -32,27 +32,29 @@ Managed policies can be attached using `xxx.addManagedPolicy(ManagedPolicy.fromA
32
32
 
33
33
  ## Granting permissions to resources
34
34
 
35
- Many of the AWS CDK resources have `grant*` methods that allow you to grant other resources access to that resource. As an example, the following code gives a Lambda function write permissions (Put, Update, Delete) to a DynamoDB table.
35
+ Many of the AWS CDK resources have grant methods (accessible via the `grants` attribute) that allow you to grant other
36
+ resources access to that resource. As an example, the following code gives a Lambda function write permissions
37
+ (Put, Update, Delete) to a DynamoDB table.
36
38
 
37
39
  ```ts
38
40
  declare const fn: lambda.Function;
39
41
  declare const table: dynamodb.Table;
40
42
 
41
- table.grantWriteData(fn);
43
+ table.grants.writeData(fn);
42
44
  ```
43
45
 
44
- The more generic `grant` method allows you to give specific permissions to a resource:
46
+ The more generic `actions` method allows you to give specific permissions to a resource:
45
47
 
46
48
  ```ts
47
49
  declare const fn: lambda.Function;
48
50
  declare const table: dynamodb.Table;
49
51
 
50
- table.grant(fn, 'dynamodb:PutItem');
52
+ table.grants.actions(fn, 'dynamodb:PutItem');
51
53
  ```
52
54
 
53
- The `grant*` methods accept an `IGrantable` object. This interface is implemented by IAM principal resources (groups, users and roles), policies, managed policies and resources that assume a role such as a Lambda function, EC2 instance or a Codebuild project.
55
+ The grant methods accept an `IGrantable` object. This interface is implemented by IAM principal resources (groups, users and roles), policies, managed policies and resources that assume a role such as a Lambda function, EC2 instance or a Codebuild project.
54
56
 
55
- You can find which `grant*` methods exist for a resource in the [AWS CDK API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html).
57
+ You can find which grant methods exist for a resource in the [AWS CDK API Reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-construct-library.html).
56
58
 
57
59
  ## Roles
58
60
 
@@ -70,8 +72,8 @@ automatically if you associate the construct with other constructs from the
70
72
  AWS Construct Library (for example, if you tell an *AWS CodePipeline* to trigger
71
73
  an *AWS Lambda Function*, the Pipeline's Role will automatically get
72
74
  `lambda:InvokeFunction` permissions on that particular Lambda Function),
73
- or if you explicitly grant permissions using `grant` functions (see the
74
- previous section).
75
+ or if you explicitly grant permissions using the public methods in the
76
+ `RoleGrants` class (see the previous section).
75
77
 
76
78
  ### Opting out of automatic permissions management
77
79
 
@@ -186,7 +188,7 @@ const fn = new lambda.Function(this, 'MyLambda', {
186
188
  });
187
189
 
188
190
  const bucket = new s3.Bucket(this, 'Bucket');
189
- bucket.grantRead(fn);
191
+ bucket.grants.read(fn);
190
192
  ```
191
193
 
192
194
  The following report will be generated.
@@ -445,7 +447,8 @@ new iam.Role(this, 'Role', {
445
447
 
446
448
  ### Granting a principal permission to assume a role
447
449
 
448
- A principal can be granted permission to assume a role using `grantAssumeRole`.
450
+ A principal can be granted permission to assume a role using `assumeRole` from the `RoleGrants` class.
451
+ For convenience, an instance of this class is available via the `grants` attribute on the `Role` class.
449
452
 
450
453
  Note that this does not apply to service principals or account principals as they must be added to the role trust policy via `assumeRolePolicy`.
451
454
 
@@ -455,7 +458,7 @@ const role = new iam.Role(this, 'role', {
455
458
  assumedBy: new iam.AccountPrincipal(this.account)
456
459
  });
457
460
 
458
- role.grantAssumeRole(user);
461
+ role.grants.assumeRole(user);
459
462
  ```
460
463
 
461
464
  ### Granting service and account principals permission to assume a role
@@ -499,7 +499,76 @@ myFunction.addEventSource(new ManagedKafkaEventSource({
499
499
  }));
500
500
  ```
501
501
 
502
- Set configuration for provisioned pollers that read from the event source.
502
+ ### Kafka Observability Features
503
+
504
+ AWS Lambda provides enhanced observability for Kafka event sources through logging and metrics configuration.
505
+
506
+ **Important**: Observability features (`LogLevel` and `MetricsConfig`) are only available when using provisioned mode.
507
+
508
+ #### Logging
509
+
510
+ You can configure the verbosity of logs generated by the polling infrastructure.
511
+ This is particularly useful for troubleshooting connection issues, monitoring
512
+ polling behavior, and understanding the internal operations of your event
513
+ source mapping.
514
+
515
+ ```ts
516
+ import { ManagedKafkaEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
517
+
518
+ // Your MSK cluster arn
519
+ const clusterArn = 'arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4';
520
+
521
+ declare const myFunction: lambda.Function;
522
+
523
+ // Configure INFO level logging for production monitoring
524
+ myFunction.addEventSource(new ManagedKafkaEventSource({
525
+ clusterArn,
526
+ topic: 'production-events',
527
+ startingPosition: lambda.StartingPosition.LATEST,
528
+ // Provisioned mode is required for observability features
529
+ provisionedPollerConfig: {
530
+ minimumPollers: 1,
531
+ maximumPollers: 5,
532
+ },
533
+ logLevel: lambda.EventSourceMappingLogLevel.INFO
534
+ }));
535
+ ```
536
+
537
+ #### Metrics Configuration
538
+
539
+ Enhanced metrics provide detailed insights into your Kafka event source performance.
540
+ Metrics include event processing rates, error counts, and Kafka-specific metrics
541
+ like consumer lag.
542
+
543
+ ```ts
544
+ import { ManagedKafkaEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
545
+
546
+ // Your MSK cluster arn
547
+ const clusterArn = 'arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4';
548
+
549
+ declare const myFunction: lambda.Function;
550
+
551
+ // Enable basic event and error metrics
552
+ myFunction.addEventSource(new ManagedKafkaEventSource({
553
+ clusterArn,
554
+ topic: 'basic-monitoring',
555
+ startingPosition: lambda.StartingPosition.LATEST,
556
+ // Provisioned mode is required for observability features
557
+ provisionedPollerConfig: {
558
+ minimumPollers: 2,
559
+ maximumPollers: 10,
560
+ },
561
+ metricsConfig: {
562
+ metrics: [
563
+ lambda.MetricType.EVENT_COUNT,
564
+ lambda.MetricType.ERROR_COUNT
565
+ ]
566
+ }
567
+ }));
568
+ ```
569
+
570
+ Set configuration for provisioned pollers that read from the event source. When specified, allows control over
571
+ the minimum and maximum number of pollers that can be provisioned to process events from the source.
503
572
 
504
573
  ```ts
505
574
  import { ManagedKafkaEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
@@ -544,7 +613,9 @@ ordersFunction.addEventSource(new ManagedKafkaEventSource({
544
613
 
545
614
  ```
546
615
 
547
- Set a confluent or self-managed schema registry to de-serialize events from the event source. Note, this will similarly work for `SelfManagedKafkaEventSource` but the example only shows setup for `ManagedKafkaEventSource`.
616
+ Set a confluent or self-managed schema registry to de-serialize events from the event source.
617
+
618
+ Note: This will also work for `SelfManagedKafkaEventSource`.
548
619
 
549
620
  ```ts
550
621
  import { ManagedKafkaEventSource, ConfluentSchemaRegistry } from 'aws-cdk-lib/aws-lambda-event-sources';
@@ -577,7 +648,9 @@ myFunction.addEventSource(new ManagedKafkaEventSource({
577
648
  }));
578
649
  ```
579
650
 
580
- Set Glue schema registry to de-serialize events from the event source. Note, this will similarly work for `SelfManagedKafkaEventSource` but the example only shows setup for `ManagedKafkaEventSource`.
651
+ Set Glue schema registry to de-serialize events from the event source.
652
+
653
+ Note: This will also work for `SelfManagedKafkaEventSource`.
581
654
 
582
655
  ```ts
583
656
  import { CfnRegistry } from 'aws-cdk-lib/aws-glue';
@@ -0,0 +1,90 @@
1
+ import * as lambda from 'aws-cdk-lib/aws-lambda';
2
+ import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
3
+ import * as cdk from 'aws-cdk-lib';
4
+ import * as integ from '@aws-cdk/integ-tests-alpha';
5
+ import { TestFunction } from './test-function';
6
+ import { AuthenticationMethod, SelfManagedKafkaEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
7
+
8
+ /**
9
+ * Integration test for Kafka observability features (LoggingConfig and MetricsConfig)
10
+ *
11
+ * This test validates that LoggingConfig and MetricsConfig generate correct CloudFormation
12
+ * templates with proper provisioned poller configuration.
13
+ *
14
+ * Test scenarios:
15
+ * 1. Self-managed Kafka with LoggingConfig only
16
+ * 2. Self-managed Kafka with MetricsConfig only
17
+ */
18
+ class KafkaObservabilityTest extends cdk.Stack {
19
+ constructor(scope: cdk.App, id: string) {
20
+ super(scope, id);
21
+
22
+ // Create secret for authentication
23
+ const secret = new secretsmanager.Secret(this, 'KafkaSecret', {
24
+ secretObjectValue: {
25
+ username: cdk.SecretValue.unsafePlainText('testuser'),
26
+ password: cdk.SecretValue.unsafePlainText('testpass'),
27
+ },
28
+ });
29
+
30
+ // Scenario 1: Self-managed Kafka with LoggingConfig only
31
+ const smkLoggingFunction = new TestFunction(this, 'SMKLoggingFunction');
32
+ smkLoggingFunction.addEventSource(new SelfManagedKafkaEventSource({
33
+ bootstrapServers: ['kafka-broker-1:9092', 'kafka-broker-2:9092'],
34
+ topic: 'logging-topic',
35
+ secret: secret,
36
+ authenticationMethod: AuthenticationMethod.SASL_SCRAM_512_AUTH,
37
+ startingPosition: lambda.StartingPosition.LATEST,
38
+ consumerGroupId: 'logging-consumer-group',
39
+ // Provisioned mode is required for observability features
40
+ provisionedPollerConfig: {
41
+ minimumPollers: 1,
42
+ maximumPollers: 5,
43
+ },
44
+ // Configure DEBUG level logging for detailed troubleshooting
45
+ logLevel: lambda.EventSourceMappingLogLevel.DEBUG,
46
+ }));
47
+
48
+ // Scenario 2: Self-managed Kafka with MetricsConfig only
49
+ const smkMetricsFunction = new TestFunction(this, 'SMKMetricsFunction');
50
+ smkMetricsFunction.addEventSource(new SelfManagedKafkaEventSource({
51
+ bootstrapServers: ['kafka-broker-3:9092', 'kafka-broker-4:9092'],
52
+ topic: 'metrics-topic',
53
+ secret: secret,
54
+ authenticationMethod: AuthenticationMethod.SASL_SCRAM_256_AUTH,
55
+ startingPosition: lambda.StartingPosition.TRIM_HORIZON,
56
+ consumerGroupId: 'metrics-consumer-group',
57
+ batchSize: 100,
58
+ // Provisioned mode is required for observability features
59
+ provisionedPollerConfig: {
60
+ minimumPollers: 3,
61
+ maximumPollers: 15,
62
+ },
63
+ // Configure comprehensive metrics including Kafka-specific metrics
64
+ metricsConfig: {
65
+ metrics: [
66
+ lambda.MetricType.EVENT_COUNT,
67
+ lambda.MetricType.ERROR_COUNT,
68
+ lambda.MetricType.KAFKA_METRICS,
69
+ ],
70
+ },
71
+ }));
72
+ }
73
+ }
74
+
75
+ const app = new cdk.App({
76
+ postCliContext: {
77
+ '@aws-cdk/aws-lambda:useCdkManagedLogGroup': false,
78
+ },
79
+ });
80
+
81
+ const stack = new KafkaObservabilityTest(
82
+ app,
83
+ 'KafkaObservabilityTest',
84
+ );
85
+
86
+ new integ.IntegTest(app, 'KafkaObservabilityIntegTest', {
87
+ testCases: [stack],
88
+ });
89
+
90
+ app.synth();
@@ -68,14 +68,14 @@ Or more conveniently, write permissions to the log group can be granted as follo
68
68
 
69
69
  ```ts
70
70
  const logGroup = new logs.LogGroup(this, 'LogGroup');
71
- logGroup.grantWrite(new iam.ServicePrincipal('es.amazonaws.com'));
71
+ logGroup.grants.write(new iam.ServicePrincipal('es.amazonaws.com'));
72
72
  ```
73
73
 
74
74
  Similarly, read permissions can be granted to the log group as follows.
75
75
 
76
76
  ```ts
77
77
  const logGroup = new logs.LogGroup(this, 'LogGroup');
78
- logGroup.grantRead(new iam.ServicePrincipal('es.amazonaws.com'));
78
+ logGroup.grants.read(new iam.ServicePrincipal('es.amazonaws.com'));
79
79
  ```
80
80
 
81
81
  Be aware that any ARNs or tokenized values passed to the resource policy will be converted into AWS Account IDs.
@@ -61,14 +61,14 @@ myTopic.addSubscription(new subscriptions.SqsSubscription(queue));
61
61
  Note that subscriptions of queues in different accounts need to be manually confirmed by
62
62
  reading the initial message from the queue and visiting the link found in it.
63
63
 
64
- The `grantSubscribe` method adds a policy statement to the topic's resource policy, allowing the specified principal to perform the `sns:Subscribe` action.
64
+ The `topic.grants.subscribe` method adds a policy statement to the topic's resource policy, allowing the specified principal to perform the `sns:Subscribe` action.
65
65
  It's useful when you want to allow entities, such as another AWS account or resources created later, to subscribe to the topic at their own pace, separating permission granting from the actual subscription process.
66
66
 
67
67
  ```ts
68
68
  declare const accountPrincipal: iam.AccountPrincipal;
69
69
  const myTopic = new sns.Topic(this, 'MyTopic');
70
70
 
71
- myTopic.grantSubscribe(accountPrincipal);
71
+ myTopic.grants.subscribe(accountPrincipal);
72
72
  ```
73
73
 
74
74
  ### Filter policy
@@ -0,0 +1,29 @@
1
+ import * as cdk from 'aws-cdk-lib/core';
2
+ import * as integ from '@aws-cdk/integ-tests-alpha';
3
+ import * as s3 from 'aws-cdk-lib/aws-s3';
4
+
5
+ const app = new cdk.App();
6
+ const stack = new cdk.Stack(app, 'ParentStack');
7
+
8
+ const nested = new cdk.NestedStack(stack, 'NestedSuppressIndentation', {
9
+ suppressTemplateIndentation: true,
10
+ });
11
+ new s3.Bucket(nested, 'Bucket'); // dummy
12
+
13
+ const testCase = new integ.IntegTest(app, 'NestedSuppressIndentationTest', {
14
+ testCases: [stack],
15
+ });
16
+
17
+ const nestedChild = nested.node.defaultChild as cdk.CfnStack;
18
+ const nestedTemplateUrl = nestedChild.templateUrl!; // Nested stacks must have the templateUrl
19
+
20
+ const apiCall = testCase.assertions.awsApiCall('S3', 'getObject', {
21
+ Bucket: cdk.Fn.select(3, cdk.Fn.split('/', nestedTemplateUrl)),
22
+ Key: cdk.Fn.select(4, cdk.Fn.split('/', nestedTemplateUrl)),
23
+ });
24
+
25
+ apiCall.expect(
26
+ integ.ExpectedResult.objectLike({
27
+ Body: '{"Resources":{"Bucket83908E77":{"Type":"AWS::S3::Bucket","UpdateReplacePolicy":"Retain","DeletionPolicy":"Retain"}}}',
28
+ }),
29
+ );
@@ -109,6 +109,7 @@ Flags come in three types:
109
109
  | [@aws-cdk/aws-stepfunctions-tasks:httpInvokeDynamicJsonPathEndpoint](#aws-cdkaws-stepfunctions-taskshttpinvokedynamicjsonpathendpoint) | When enabled, allows using a dynamic apiEndpoint with JSONPath format in HttpInvoke tasks. | 2.221.0 | fix |
110
110
  | [@aws-cdk/aws-elasticloadbalancingv2:networkLoadBalancerWithSecurityGroupByDefault](#aws-cdkaws-elasticloadbalancingv2networkloadbalancerwithsecuritygroupbydefault) | When enabled, Network Load Balancer will be created with a security group by default. | 2.222.0 | new default |
111
111
  | [@aws-cdk/aws-route53-patterns:useDistribution](#aws-cdkaws-route53-patternsusedistribution) | Use the `Distribution` resource instead of `CloudFrontWebDistribution` | 2.233.0 | new default |
112
+ | [@aws-cdk/aws-eks:useNativeOidcProvider](#aws-cdkaws-eksusenativeoidcprovider) | When enabled, EKS V2 clusters will use the native OIDC provider resource AWS::IAM::OIDCProvider instead of creating the OIDCProvider with a custom resource (iam.OpenIDConnectProvider). | V2NEXT | fix |
112
113
 
113
114
  <!-- END table -->
114
115
 
@@ -170,6 +171,7 @@ The following json shows the current recommended set of flags, as `cdk init` wou
170
171
  "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true,
171
172
  "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": true,
172
173
  "@aws-cdk/aws-eks:nodegroupNameAttribute": true,
174
+ "@aws-cdk/aws-eks:useNativeOidcProvider": true,
173
175
  "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": true,
174
176
  "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": true,
175
177
  "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": false,
@@ -2311,4 +2313,27 @@ of the deprecated `CloudFrontWebDistribution` construct.
2311
2313
  **Compatibility with old behavior:** Define a `CloudFrontWebDistribution` explicitly
2312
2314
 
2313
2315
 
2316
+ ### @aws-cdk/aws-eks:useNativeOidcProvider
2317
+
2318
+ *When enabled, EKS V2 clusters will use the native OIDC provider resource AWS::IAM::OIDCProvider instead of creating the OIDCProvider with a custom resource (iam.OpenIDConnectProvider).*
2319
+
2320
+ Flag type: Backwards incompatible bugfix
2321
+
2322
+ When this feature flag is enabled, EKS clusters will use the native AWS::IAM::OIDCProvider
2323
+ CloudFormation resource instead of the custom resource provider for creating OIDC providers.
2324
+
2325
+ WARNING: Enabling this flag on a cluster with an existing OIDC provider created by the custom resource (iam.OpenIDConnectProvider)
2326
+ will cause the OIDC provider to be replaced with the native resource, which may lead to disruption.
2327
+
2328
+ To migrate in place without disruption, follow the guide at: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-eks/README.md#migrating-from-the-deprecated-eksopenidconnectprovider-to-eksoidcprovidernative
2329
+
2330
+
2331
+ | Since | Unset behaves like | Recommended value |
2332
+ | ----- | ----- | ----- |
2333
+ | (not in v1) | | |
2334
+ | V2NEXT | `false` | `true` |
2335
+
2336
+ **Compatibility with old behavior:** Disable the feature flag to use the custom resource provider.
2337
+
2338
+
2314
2339
  <!-- END details -->
@@ -628,7 +628,7 @@ The Action can also be used as a Grantable after having been added to a Pipeline
628
628
  const action = new pipelines.ShellScriptAction({ /* ... */ });
629
629
  pipeline.addStage('Test').addActions(action);
630
630
 
631
- bucket.grantRead(action);
631
+ bucket.grants.read(action);
632
632
  ```
633
633
 
634
634
  #### Additional files from the source repository
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: konokenj.cdk-api-mcp-server
3
- Version: 0.70.0
3
+ Version: 0.72.0
4
4
  Summary: An MCP server provides AWS CDK API Reference
5
5
  Project-URL: Documentation, https://github.com/konokenj/cdk-api-mcp-server#readme
6
6
  Project-URL: Issues, https://github.com/konokenj/cdk-api-mcp-server/issues
@@ -26,7 +26,7 @@ Description-Content-Type: text/markdown
26
26
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/konokenj.cdk-api-mcp-server.svg)](https://pypi.org/project/konokenj.cdk-api-mcp-server)
27
27
 
28
28
  <!-- DEP-VERSIONS-START -->
29
- [![aws-cdk](https://img.shields.io/badge/aws%20cdk-v2.235.0-blue.svg)](https://github.com/konokenj/cdk-api-mcp-server/blob/main/current-versions/aws-cdk.txt)
29
+ [![aws-cdk](https://img.shields.io/badge/aws%20cdk-v2.236.0-blue.svg)](https://github.com/konokenj/cdk-api-mcp-server/blob/main/current-versions/aws-cdk.txt)
30
30
  <!-- DEP-VERSIONS-END -->
31
31
 
32
32
  ---