konokenj.cdk-api-mcp-server 0.57.0__py3-none-any.whl → 0.59.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 (32) 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 +119 -15
  3. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/aws-imagebuilder-alpha/README.md +428 -8
  4. cdk_api_mcp_server/resources/aws-cdk/constructs/@aws-cdk/mixins-preview/README.md +9 -7
  5. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appconfig/integ.configuration-kms.ts +2 -1
  6. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appconfig/integ.configuration.ts +3 -2
  7. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-appmesh/README.md +4 -4
  8. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codecommit/integ.codecommit-code-asset-zip.ts +2 -1
  9. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-codecommit/integ.codecommit-code-asset.ts +2 -1
  10. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2/integ.alb.oidc.ts +2 -1
  11. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-elasticloadbalancingv2-actions/integ.cognito.ts +2 -1
  12. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.lambda-snapstart.ts +1 -1
  13. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.lambda-sourceKMSKeyArn.ts +2 -2
  14. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda/integ.runtimes.ts +2 -1
  15. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-event-sources/README.md +101 -2
  16. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-event-sources/integ.kafka-dlq.ts +92 -0
  17. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-event-sources/integ.kafka-poller-group-name.ts +78 -0
  18. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-lambda-event-sources/integ.kafka-selfmanaged-error-handling.ts +83 -0
  19. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.nested-stack-in-product-stack.ts +3 -2
  20. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.product.encrypted.asset.ts +2 -2
  21. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-servicecatalog/integ.product.ts +2 -2
  22. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/aws-stepfunctions/integ.state-machine-jsonata.ts +6 -4
  23. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.autoscaling-update-policy.ts +2 -1
  24. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.intrinsic-deletion-policy.ts +2 -1
  25. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.nested-stacks.ts +3 -2
  26. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/cloudformation-include/integ.resource-tags-wtih-intrinsics.ts +2 -1
  27. cdk_api_mcp_server/resources/aws-cdk/constructs/aws-cdk-lib/triggers/integ.triggers.ts +2 -1
  28. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.59.0.dist-info}/METADATA +2 -2
  29. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.59.0.dist-info}/RECORD +32 -29
  30. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.59.0.dist-info}/WHEEL +0 -0
  31. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.59.0.dist-info}/entry_points.txt +0 -0
  32. {konokenj_cdk_api_mcp_server-0.57.0.dist-info → konokenj_cdk_api_mcp_server-0.59.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Kenji Kono <konoken@amazon.co.jp>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.57.0"
4
+ __version__ = "0.59.0"
@@ -80,6 +80,7 @@ This construct library facilitates the deployment of Bedrock AgentCore primitive
80
80
  - [Creating a Runtime](#creating-a-runtime)
81
81
  - [Option 1: Use an existing image in ECR](#option-1-use-an-existing-image-in-ecr)
82
82
  - [Option 2: Use a local asset](#option-2-use-a-local-asset)
83
+ - [Option 3: Use direct code deployment](#option-3-use-direct-code-deployment)
83
84
  - [Granting Permissions to Invoke Bedrock Models or Inference Profiles](#granting-permissions-to-invoke-bedrock-models-or-inference-profiles)
84
85
  - [Runtime Versioning](#runtime-versioning)
85
86
  - [Managing Endpoints and Versions](#managing-endpoints-and-versions)
@@ -163,6 +164,8 @@ to production by simply updating the endpoint to point to the newer version.
163
164
  | `authorizerConfiguration` | `RuntimeAuthorizerConfiguration` | No | Authorizer configuration for the agent runtime. Use `RuntimeAuthorizerConfiguration` static methods to create configurations for IAM, Cognito, JWT, or OAuth authentication |
164
165
  | `environmentVariables` | `{ [key: string]: string }` | No | Environment variables for the agent runtime. Maximum 50 environment variables |
165
166
  | `tags` | `{ [key: string]: string }` | No | Tags for the agent runtime. A list of key:value pairs of tags to apply to this Runtime resource |
167
+ | `lifecycleConfiguration` | LifecycleConfiguration | No | The life cycle configuration for the AgentCore Runtime. Defaults to 900 seconds (15 minutes) for idle, 28800 seconds (8 hours) for max life time |
168
+ | `requestHeaderConfiguration` | RequestHeaderConfiguration | No | Configuration for HTTP request headers that will be passed through to the runtime. Defaults to no configuration |
166
169
 
167
170
  ### Runtime Endpoint Properties
168
171
 
@@ -180,7 +183,7 @@ to production by simply updating the endpoint to point to the newer version.
180
183
 
181
184
  Reference an image available within ECR.
182
185
 
183
- ```typescript
186
+ ```typescript fixture=default
184
187
  const repository = new ecr.Repository(this, "TestRepository", {
185
188
  repositoryName: "test-agent-runtime",
186
189
  });
@@ -201,7 +204,7 @@ Reference a local directory containing a Dockerfile.
201
204
  Images are built from a local Docker context directory (with a Dockerfile), uploaded to Amazon Elastic Container Registry (ECR)
202
205
  by the CDK toolkit,and can be naturally referenced in your CDK app.
203
206
 
204
- ```typescript
207
+ ```typescript fixture=default
205
208
  const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromAsset(
206
209
  path.join(__dirname, "path to agent dockerfile directory")
207
210
  );
@@ -212,6 +215,40 @@ const runtime = new agentcore.Runtime(this, "MyAgentRuntime", {
212
215
  });
213
216
  ```
214
217
 
218
+ #### Option 3: Use direct code deployment
219
+
220
+ With the container deployment method, developers create a Dockerfile, build ARM-compatible containers, manage ECR repositories, and upload containers for code changes. This works well where container DevOps pipelines have already been established to automate deployments.
221
+
222
+ However, customers looking for fully managed deployments can benefit from direct code deployment, which can significantly improve developer time and productivity. Direct code deployment provides a secure and scalable path forward for rapid prototyping agent capabilities to deploying production workloads at scale.
223
+
224
+ With direct code deployment, developers create a zip archive of code and dependencies, upload to Amazon S3, and configure the bucket in the agent configuration. A ZIP archive containing Linux arm64 dependencies needs to be uploaded to S3 as a pre-requisite to Create Agent Runtime.
225
+
226
+ For more information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-code-deploy.html).
227
+
228
+ ```typescript fixture=default
229
+ // S3 bucket containing the agent core
230
+ const codeBucket = new s3.Bucket(this, "AgentCode", {
231
+ bucketName: "my-code-bucket",
232
+ removalPolicy: RemovalPolicy.DESTROY, // For demo purposes
233
+ });
234
+
235
+ // the bucket above needs to contain the agent code
236
+
237
+ const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromS3(
238
+ {
239
+ bucketName: codeBucket.bucketName,
240
+ objectKey: 'deployment_package.zip',
241
+ },
242
+ agentcore.AgentCoreRuntime.PYTHON_3_12,
243
+ ['opentelemetry-instrument', 'main.py']
244
+ );
245
+
246
+ const runtimeInstance = new agentcore.Runtime(this, "MyAgentRuntime", {
247
+ runtimeName: "myAgent",
248
+ agentRuntimeArtifact: agentRuntimeArtifact,
249
+ });
250
+ ```
251
+
215
252
  ### Granting Permissions to Invoke Bedrock Models or Inference Profiles
216
253
 
217
254
  To grant the runtime permissions to invoke Bedrock models or inference profiles:
@@ -254,7 +291,7 @@ the steps below to understand how to use versioning with runtime for controlled
254
291
  When you first create an agent runtime, AgentCore automatically creates Version 1 of your runtime. At this point, a DEFAULT endpoint is
255
292
  automatically created that points to Version 1. This DEFAULT endpoint serves as the main access point for your runtime.
256
293
 
257
- ```ts
294
+ ```typescript fixture=default
258
295
  const repository = new ecr.Repository(this, "TestRepository", {
259
296
  repositoryName: "test-agent-runtime",
260
297
  });
@@ -271,7 +308,7 @@ After the initial deployment, you can create additional endpoints for different
271
308
  endpoint that explicitly points to Version 1. This allows you to maintain stable access points for specific environments while keeping the
272
309
  flexibility to test newer versions elsewhere.
273
310
 
274
- ```ts
311
+ ```typescript fixture=default
275
312
  const repository = new ecr.Repository(this, "TestRepository", {
276
313
  repositoryName: "test-agent-runtime",
277
314
  });
@@ -296,7 +333,7 @@ configurations), AgentCore automatically creates a new version (Version 2). Upon
296
333
  - The DEFAULT endpoint automatically updates to point to Version 2
297
334
  - Any explicitly pinned endpoints (like the production endpoint) remain on their specified versions
298
335
 
299
- ```ts
336
+ ```typescript fixture=default
300
337
  const repository = new ecr.Repository(this, "TestRepository", {
301
338
  repositoryName: "test-agent-runtime",
302
339
  });
@@ -315,7 +352,7 @@ Once Version 2 exists, you can create a staging endpoint that points to the new
315
352
  new version in a controlled environment before promoting it to production. This separation ensures that production traffic continues
316
353
  to use the stable version while you validate the new version.
317
354
 
318
- ```ts
355
+ ```typescript fixture=default
319
356
  const repository = new ecr.Repository(this, "TestRepository", {
320
357
  repositoryName: "test-agent-runtime",
321
358
  });
@@ -338,7 +375,7 @@ const stagingEndpoint = runtime.addEndpoint("staging", {
338
375
  After thoroughly testing the new version through the staging endpoint, you can update the production endpoint to point to Version 2.
339
376
  This controlled promotion process ensures that you can validate changes before they affect production traffic.
340
377
 
341
- ```ts
378
+ ```typescript fixture=default
342
379
  const repository = new ecr.Repository(this, "TestRepository", {
343
380
  repositoryName: "test-agent-runtime",
344
381
  });
@@ -362,7 +399,7 @@ RuntimeEndpoint can also be created as a standalone resource.
362
399
 
363
400
  #### Example: Creating an endpoint for an existing runtime
364
401
 
365
- ```typescript
402
+ ```typescript fixture=default
366
403
  // Reference an existing runtime by its ID
367
404
  const existingRuntimeId = "abc123-runtime-id"; // The ID of an existing runtime
368
405
 
@@ -387,7 +424,7 @@ IAM authentication is the default mode, when no authorizerConfiguration is set t
387
424
 
388
425
  To configure AWS Cognito User Pool authentication:
389
426
 
390
- ```typescript
427
+ ```typescript fixture=default
391
428
  declare const userPool: cognito.UserPool;
392
429
  declare const userPoolClient: cognito.UserPoolClient;
393
430
  declare const anotherUserPoolClient: cognito.UserPoolClient;
@@ -411,7 +448,7 @@ const runtime = new agentcore.Runtime(this, "MyAgentRuntime", {
411
448
 
412
449
  To configure custom JWT authentication with your own OpenID Connect (OIDC) provider:
413
450
 
414
- ```typescript
451
+ ```typescript fixture=default
415
452
  const repository = new ecr.Repository(this, "TestRepository", {
416
453
  repositoryName: "test-agent-runtime",
417
454
  });
@@ -434,7 +471,7 @@ const runtime = new agentcore.Runtime(this, "MyAgentRuntime", {
434
471
 
435
472
  To configure OAuth 2.0 authentication:
436
473
 
437
- ```typescript
474
+ ```typescript fixture=default
438
475
  const repository = new ecr.Repository(this, "TestRepository", {
439
476
  repositoryName: "test-agent-runtime",
440
477
  });
@@ -463,7 +500,7 @@ The AgentCore Runtime supports two network modes for deployment:
463
500
 
464
501
  By default, runtimes are deployed in PUBLIC network mode, which provides internet access suitable for less sensitive or open-use scenarios:
465
502
 
466
- ```typescript
503
+ ```typescript fixture=default
467
504
  const repository = new ecr.Repository(this, "TestRepository", {
468
505
  repositoryName: "test-agent-runtime",
469
506
  });
@@ -481,7 +518,7 @@ const runtime = new agentcore.Runtime(this, "MyAgentRuntime", {
481
518
 
482
519
  For enhanced security and network isolation, you can deploy your runtime within a VPC:
483
520
 
484
- ```typescript
521
+ ```typescript fixture=default
485
522
  const repository = new ecr.Repository(this, "TestRepository", {
486
523
  repositoryName: "test-agent-runtime",
487
524
  });
@@ -510,8 +547,7 @@ const runtime = new agentcore.Runtime(this, "MyAgentRuntime", {
510
547
 
511
548
  When using VPC mode, the Runtime implements `ec2.IConnectable`, allowing you to manage network access using the `connections` property:
512
549
 
513
- ```typescript
514
-
550
+ ```typescript fixture=default
515
551
  const vpc = new ec2.Vpc(this, 'MyVpc', {
516
552
  maxAzs: 2,
517
553
  });
@@ -544,6 +580,58 @@ runtime.connections.allowTo(databaseSecurityGroup, ec2.Port.tcp(5432), 'Allow Po
544
580
  runtime.connections.allowToAnyIpv4(ec2.Port.tcp(443), 'Allow HTTPS outbound');
545
581
  ```
546
582
 
583
+ ### Other configuration
584
+
585
+ #### Lifecycle configuration
586
+
587
+ The LifecycleConfiguration input parameter to CreateAgentRuntime lets you manage the lifecycle of runtime sessions and resources in Amazon Bedrock AgentCore Runtime. This configuration helps optimize resource utilization by automatically cleaning up idle sessions and preventing long-running instances from consuming resources indefinitely.
588
+
589
+ You can configure:
590
+
591
+ - idleRuntimeSessionTimeout: Timeout in seconds for idle runtime sessions. When a session remains idle for this duration, it will trigger termination. Termination can last up to 15 seconds due to logging and other process completion. Default: 900 seconds (15 minutes)
592
+ - maxLifetime: Maximum lifetime for the instance in seconds. Once reached, instances will initialize termination. Termination can last up to 15 seconds due to logging and other process completion. Default: 28800 seconds (8 hours)
593
+
594
+ For additional information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-lifecycle-settings.html).
595
+
596
+ ```typescript fixture=default
597
+ const repository = new ecr.Repository(this, "TestRepository", {
598
+ repositoryName: "test-agent-runtime",
599
+ });
600
+
601
+ const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");
602
+
603
+ new agentcore.Runtime(this, 'test-runtime', {
604
+ runtimeName: 'test_runtime',
605
+ agentRuntimeArtifact: agentRuntimeArtifact,
606
+ lifecycleConfiguration: {
607
+ idleRuntimeSessionTimeout: Duration.minutes(10),
608
+ maxLifetime: Duration.hours(4),
609
+ },
610
+ });
611
+ ```
612
+
613
+ #### Request header configuration
614
+
615
+ Custom headers let you pass contextual information from your application directly to your agent code without cluttering the main request payload. This includes authentication tokens like JWT (JSON Web Tokens, which contain user identity and authorization claims) through the Authorization header, allowing your agent to make decisions based on who is calling it. You can also pass custom metadata like user preferences, session identifiers, or trace context using headers prefixed with X-Amzn-Bedrock-AgentCore-Runtime-Custom-, giving your agent access to up to 20 pieces of runtime context that travel alongside each request. This information can be also used in downstream systems like AgentCore Memory that you can namespace based on those characteristics like user_id or aud in claims like line of business.
616
+
617
+ For additional information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-header-allowlist.html).
618
+
619
+ ```typescript fixture=default
620
+ const repository = new ecr.Repository(this, "TestRepository", {
621
+ repositoryName: "test-agent-runtime",
622
+ });
623
+
624
+ const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");
625
+
626
+ new agentcore.Runtime(this, 'test-runtime', {
627
+ runtimeName: 'test_runtime',
628
+ agentRuntimeArtifact: agentRuntimeArtifact,
629
+ requestHeaderConfiguration: {
630
+ allowlistedHeaders: ['X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1'],
631
+ },
632
+ });
633
+ ```
634
+
547
635
  ## Browser
548
636
 
549
637
  The Amazon Bedrock AgentCore Browser provides a secure, cloud-based browser that enables AI agents to interact with websites. It includes security features such as session isolation, built-in observability through live viewing, CloudTrail logging, and session replay capabilities.
@@ -583,6 +671,7 @@ For more information on VPC connectivity for Amazon Bedrock AgentCore Browser, p
583
671
  | `recordingConfig` | `RecordingConfig` | No | Recording configuration for browser. Defaults to no recording |
584
672
  | `executionRole` | `iam.IRole` | No | The IAM role that provides permissions for the browser to access AWS services. A new role will be created if not provided |
585
673
  | `tags` | `{ [key: string]: string }` | No | Tags to apply to the browser resource |
674
+ | `browserSigning` | BrowserSigning | No | Browser signing configuration. Defaults to DISABLED |
586
675
 
587
676
  ### Basic Browser Creation
588
677
 
@@ -709,6 +798,21 @@ const browser = new agentcore.BrowserCustom(this, "MyBrowser", {
709
798
  // when recording is enabled, so no additional IAM configuration is needed
710
799
  ```
711
800
 
801
+ ### Browser with Browser signing
802
+
803
+ AI agents need to browse the web on your behalf. When your agent visits a website to gather information, complete a form, or verify data, it encounters the same defenses designed to stop unwanted bots: CAPTCHAs, rate limits, and outright blocks.
804
+
805
+ Amazon Bedrock AgentCore Browser supports Web Bot Auth. Web Bot Auth is a draft IETF protocol that gives agents verifiable cryptographic identities. When you enable Web Bot Auth in AgentCore Browser, the service issues cryptographic credentials that websites can verify. The agent presents these credentials with every request. The WAF may now additionally check the signature, confirm it matches a trusted directory, and allow the request through if verified bots are allowed by the domain owner and other WAF checks are clear.
806
+
807
+ To enable the browser to sign requests using the Web Bot Auth protocol, create a browser tool with the browserSigning configuration:
808
+
809
+ ```typescript fixture=default
810
+ const browser = new agentcore.BrowserCustom(this, 'test-browser', {
811
+ browserCustomName: 'test_browser',
812
+ browserSigning: agentcore.BrowserSigning.ENABLED
813
+ });
814
+ ```
815
+
712
816
  ### Browser IAM Permissions
713
817
 
714
818
  The Browser construct provides convenient methods for granting IAM permissions: