@aws-cdk/aws-bedrock-agentcore-alpha 2.238.0-alpha.0 → 2.240.0-alpha.0
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.
- package/.jsii +1429 -263
- package/.jsii.tabl.json.gz +0 -0
- package/.warnings.jsii.js +119 -1
- package/README.md +109 -47
- package/lib/gateway/gateway-base.js +1 -1
- package/lib/gateway/gateway.d.ts +55 -0
- package/lib/gateway/gateway.js +38 -2
- package/lib/gateway/inbound-auth/authorizer.js +3 -3
- package/lib/gateway/inbound-auth/custom-claim.js +1 -1
- package/lib/gateway/interceptor.js +1 -1
- package/lib/gateway/outbound-auth/api-key.js +1 -1
- package/lib/gateway/outbound-auth/credential-provider.js +1 -1
- package/lib/gateway/protocol.js +2 -2
- package/lib/gateway/targets/schema/api-schema.js +4 -4
- package/lib/gateway/targets/schema/tool-schema.js +4 -4
- package/lib/gateway/targets/target-base.d.ts +3 -1
- package/lib/gateway/targets/target-base.js +4 -2
- package/lib/gateway/targets/target-configuration.d.ts +246 -0
- package/lib/gateway/targets/target-configuration.js +344 -8
- package/lib/gateway/targets/target.d.ts +51 -2
- package/lib/gateway/targets/target.js +46 -3
- package/lib/memory/memory-strategy.js +1 -1
- package/lib/memory/memory.js +2 -2
- package/lib/memory/strategies/managed-strategy.js +1 -1
- package/lib/memory/strategies/self-managed-strategy.js +1 -1
- package/lib/network/network-configuration.js +4 -4
- package/lib/runtime/inbound-auth/custom-claim.js +1 -1
- package/lib/runtime/inbound-auth/runtime-authorizer-configuration.js +1 -1
- package/lib/runtime/runtime-artifact.d.ts +23 -0
- package/lib/runtime/runtime-artifact.js +67 -2
- package/lib/runtime/runtime-base.js +1 -1
- package/lib/runtime/runtime-endpoint-base.js +1 -1
- package/lib/runtime/runtime-endpoint.js +1 -1
- package/lib/runtime/runtime.js +1 -1
- package/lib/tools/browser.js +2 -2
- package/lib/tools/code-interpreter.js +2 -2
- package/package.json +12 -12
- package/rosetta/default.ts-fixture +1 -0
package/.jsii
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@aws-cdk/aws-bedrock-alpha": "2.
|
|
12
|
-
"aws-cdk-lib": "^2.
|
|
13
|
-
"constructs": "^10.
|
|
11
|
+
"@aws-cdk/aws-bedrock-alpha": "2.240.0-alpha.0",
|
|
12
|
+
"aws-cdk-lib": "^2.240.0",
|
|
13
|
+
"constructs": "^10.5.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencyClosure": {
|
|
16
16
|
"@aws-cdk/asset-awscli-v1": {
|
|
@@ -1455,6 +1455,19 @@
|
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
1457
|
},
|
|
1458
|
+
"aws-cdk-lib.aws_eks_v2": {
|
|
1459
|
+
"targets": {
|
|
1460
|
+
"dotnet": {
|
|
1461
|
+
"namespace": "Amazon.CDK.AWS.EKSv2"
|
|
1462
|
+
},
|
|
1463
|
+
"java": {
|
|
1464
|
+
"package": "software.amazon.awscdk.services.eks_v2"
|
|
1465
|
+
},
|
|
1466
|
+
"python": {
|
|
1467
|
+
"module": "aws_cdk.aws_eks_v2"
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1458
1471
|
"aws-cdk-lib.aws_elasticache": {
|
|
1459
1472
|
"targets": {
|
|
1460
1473
|
"dotnet": {
|
|
@@ -8531,7 +8544,7 @@
|
|
|
8531
8544
|
"stability": "experimental"
|
|
8532
8545
|
},
|
|
8533
8546
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
8534
|
-
"jsiiVersion": "5.9.
|
|
8547
|
+
"jsiiVersion": "5.9.26 (build f85d3df)",
|
|
8535
8548
|
"keywords": [
|
|
8536
8549
|
"aws",
|
|
8537
8550
|
"cdk",
|
|
@@ -8553,7 +8566,7 @@
|
|
|
8553
8566
|
},
|
|
8554
8567
|
"name": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
8555
8568
|
"readme": {
|
|
8556
|
-
"markdown": "# Amazon Bedrock AgentCore Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n| **Language** | **Package** |\n| :--------------------------------------------------------------------------------------------- | --------------------------------------- |\n|  TypeScript | `@aws-cdk/aws-bedrock-agentcore-alpha` |\n\n[Amazon Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) enables you to deploy and operate highly capable AI agents securely, at scale. It offers infrastructure purpose-built for dynamic agent workloads, powerful tools to enhance agents, and essential controls for real-world deployment. AgentCore services can be used together or independently and work with any framework including CrewAI, LangGraph, LlamaIndex, and Strands Agents, as well as any foundation model in or outside of Amazon Bedrock, giving you ultimate flexibility. AgentCore eliminates the undifferentiated heavy lifting of building specialized agent infrastructure, so you can accelerate agents to production.\n\nThis construct library facilitates the deployment of Bedrock AgentCore primitives, enabling you to create sophisticated AI applications that can interact with your systems and data sources.\n\n> **Note:** Users need to ensure their CDK deployment role has the `iam:CreateServiceLinkedRole` permission for AgentCore service-linked roles.\n\n## Table of contents\n\n- [AgentCore Runtime](#agentcore-runtime)\n - [Runtime Versioning](#runtime-versioning)\n - [Runtime Endpoints](#runtime-endpoints)\n - [AgentCore Runtime Properties](#agentcore-runtime-properties)\n - [Runtime Endpoint Properties](#runtime-endpoint-properties)\n - [Creating a Runtime](#creating-a-runtime)\n - [Option 1: Use an existing image in ECR](#option-1-use-an-existing-image-in-ecr)\n - [Managing Endpoints and Versions](#managing-endpoints-and-versions)\n - [Option 2: Use a local asset](#option-2-use-a-local-asset)\n- [Browser Custom tool](#browser)\n - [Browser properties](#browser-properties)\n - [Browser Network modes](#browser-network-modes)\n - [Basic Browser Creation](#basic-browser-creation)\n - [Browser IAM permissions](#browser-iam-permissions)\n- [Code Interpreter Custom tool](#code-interpreter)\n - [Code Interpreter properties](#code-interpreter-properties)\n - [Code Interpreter Network Modes](#code-interpreter-network-modes)\n - [Basic Code Interpreter Creation](#basic-code-interpreter-creation)\n - [Code Interpreter IAM permissions](#code-interpreter-iam-permissions)\n- [Gateway](#gateway)\n - [Gateway Properties](#gateway-properties)\n - [Basic Gateway Creation](#basic-gateway-creation)\n - [Protocol configuration](#protocol-configuration)\n - [Inbound authorization](#inbound-authorization)\n - [Gateway with KMS Encryption](#gateway-with-kms-encryption)\n - [Gateway with Custom Execution Role](#gateway-with-custom-execution-role)\n - [Gateway IAM Permissions](#gateway-iam-permissions)\n- [Gateway Target](#gateway-target)\n - [Gateway Target Properties](#gateway-target-properties)\n - [Targets types](#targets-types)\n - [Outbound auth](#outbound-auth)\n - [Api schema](#api-schema-for-openapi-and-smithy-target)\n - [Basic Gateway Target Creation](#basic-gateway-target-creation)\n - [Using addTarget methods (Recommended)](#using-addtarget-methods-recommended)\n - [Using static factory methods](#using-static-factory-methods)\n - [Lambda Target with Tool Schema](#tools-schema-for-lambda-target)\n - [Smithy Model Target with OAuth](#api-schema-for-openapi-and-smithy-target)\n - [Gateway Target IAM Permissions](#gateway-target-iam-permissions)\n- [Memory](#memory)\n - [Memory properties](#memory-properties)\n - [Basic Memory Creation](#basic-memory-creation)\n - [LTM Memory Extraction Stategies](#ltm-memory-extraction-stategies)\n - [Memory Strategy Methods](#memory-strategy-methods)\n- [Amazon Bedrock AgentCore Construct Library](#amazon-bedrock-agentcore-construct-library)\n - [Table of contents](#table-of-contents)\n - [AgentCore Runtime](#agentcore-runtime)\n - [Runtime Endpoints](#runtime-endpoints)\n - [AgentCore Runtime Properties](#agentcore-runtime-properties)\n - [Runtime Endpoint Properties](#runtime-endpoint-properties)\n - [Creating a Runtime](#creating-a-runtime)\n - [Option 1: Use an existing image in ECR](#option-1-use-an-existing-image-in-ecr)\n - [Option 2: Use a local asset](#option-2-use-a-local-asset)\n - [Option 3: Use direct code deployment](#option-3-use-direct-code-deployment)\n - [Granting Permissions to Invoke Bedrock Models or Inference Profiles](#granting-permissions-to-invoke-bedrock-models-or-inference-profiles)\n - [Runtime Versioning](#runtime-versioning)\n - [Managing Endpoints and Versions](#managing-endpoints-and-versions)\n - [Step 1: Initial Deployment](#step-1-initial-deployment)\n - [Step 2: Creating Custom Endpoints](#step-2-creating-custom-endpoints)\n - [Step 3: Runtime Update Deployment](#step-3-runtime-update-deployment)\n - [Step 4: Testing with Staging Endpoints](#step-4-testing-with-staging-endpoints)\n - [Step 5: Promoting to Production](#step-5-promoting-to-production)\n - [Creating Standalone Runtime Endpoints](#creating-standalone-runtime-endpoints)\n - [Example: Creating an endpoint for an existing runtime](#example-creating-an-endpoint-for-an-existing-runtime)\n - [Runtime Authentication Configuration](#runtime-authentication-configuration)\n - [IAM Authentication (Default)](#iam-authentication-default)\n - [Cognito Authentication](#cognito-authentication)\n - [JWT Authentication](#jwt-authentication)\n - [OAuth Authentication](#oauth-authentication)\n - [Using a Custom IAM Role](#using-a-custom-iam-role)\n - [Runtime Network Configuration](#runtime-network-configuration)\n - [Public Network Mode (Default)](#public-network-mode-default)\n - [VPC Network Mode](#vpc-network-mode)\n - [Managing Security Groups with VPC Configuration](#managing-security-groups-with-vpc-configuration)\n - [Browser](#browser)\n - [Browser Network modes](#browser-network-modes)\n - [Browser Properties](#browser-properties)\n - [Basic Browser Creation](#basic-browser-creation)\n - [Browser with Tags](#browser-with-tags)\n - [Browser with VPC](#browser-with-vpc)\n - [Browser with Recording Configuration](#browser-with-recording-configuration)\n - [Browser with Custom Execution Role](#browser-with-custom-execution-role)\n - [Browser with S3 Recording and Permissions](#browser-with-s3-recording-and-permissions)\n - [Browser IAM Permissions](#browser-iam-permissions)\n - [Code Interpreter](#code-interpreter)\n - [Code Interpreter Network Modes](#code-interpreter-network-modes)\n - [Code Interpreter Properties](#code-interpreter-properties)\n - [Basic Code Interpreter Creation](#basic-code-interpreter-creation)\n - [Code Interpreter with VPC](#code-interpreter-with-vpc)\n - [Code Interpreter with Sandbox Network Mode](#code-interpreter-with-sandbox-network-mode)\n - [Code Interpreter with Custom Execution Role](#code-interpreter-with-custom-execution-role)\n - [Code Interpreter IAM Permissions](#code-interpreter-iam-permissions)\n - [Code interpreter with tags](#code-interpreter-with-tags)\n - [Memory](#memory)\n - [Memory Properties](#memory-properties)\n - [Basic Memory Creation](#basic-memory-creation)\n - [LTM Memory Extraction Stategies](#ltm-memory-extraction-stategies)\n - [Memory with Built-in Strategies](#memory-with-built-in-strategies)\n - [Memory with custom Strategies](#memory-with-custom-strategies)\n - [Memory with Custom Execution Role](#memory-with-custom-execution-role)\n - [Memory with self-managed Strategies](#memory-with-self-managed-strategies)\n - [Memory Strategy Methods](#memory-strategy-methods)\n\n## AgentCore Runtime\n\nThe AgentCore Runtime construct enables you to deploy containerized agents on Amazon Bedrock AgentCore.\nThis L2 construct simplifies runtime creation just pass your ECR repository name\nand the construct handles all the configuration with sensible defaults.\n\n### Runtime Endpoints\n\nEndpoints provide a stable way to invoke specific versions of your agent runtime, enabling controlled deployments across different environments.\nWhen you create an agent runtime, Amazon Bedrock AgentCore automatically creates a \"DEFAULT\" endpoint which always points to the latest version\nof runtime.\n\nYou can create additional endpoints in two ways:\n\n1. **Using Runtime.addEndpoint()** - Convenient method when creating endpoints alongside the runtime.\n2. **Using RuntimeEndpoint** - Flexible approach for existing runtimes.\n\nFor example, you might keep a \"production\" endpoint on a stable version while testing newer versions\nthrough a \"staging\" endpoint. This separation allows you to test changes thoroughly before promoting them\nto production by simply updating the endpoint to point to the newer version.\n\n### AgentCore Runtime Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `runtimeName` | `string` | No | The name of the agent runtime. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long. If not provided, a unique name will be auto-generated |\n| `agentRuntimeArtifact` | `AgentRuntimeArtifact` | Yes | The artifact configuration for the agent runtime containing the container configuration with ECR URI |\n| `executionRole` | `iam.IRole` | No | The IAM role that provides permissions for the agent runtime. If not provided, a role will be created automatically |\n| `networkConfiguration` | `NetworkConfiguration` | No | Network configuration for the agent runtime. Defaults to `RuntimeNetworkConfiguration.usingPublicNetwork()` |\n| `description` | `string` | No | Optional description for the agent runtime |\n| `protocolConfiguration` | `ProtocolType` | No | Protocol configuration for the agent runtime. Defaults to `ProtocolType.HTTP` |\n| `authorizerConfiguration` | `RuntimeAuthorizerConfiguration` | No | Authorizer configuration for the agent runtime. Use `RuntimeAuthorizerConfiguration` static methods to create configurations for IAM, Cognito, JWT, or OAuth authentication |\n| `environmentVariables` | `{ [key: string]: string }` | No | Environment variables for the agent runtime. Maximum 50 environment variables |\n| `tags` | `{ [key: string]: string }` | No | Tags for the agent runtime. A list of key:value pairs of tags to apply to this Runtime resource |\n| `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 |\n| `requestHeaderConfiguration` | RequestHeaderConfiguration | No | Configuration for HTTP request headers that will be passed through to the runtime. Defaults to no configuration |\n\n### Runtime Endpoint Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `endpointName` | `string` | No | The name of the runtime endpoint. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long. If not provided, a unique name will be auto-generated |\n| `agentRuntimeId` | `string` | Yes | The Agent Runtime ID for this endpoint |\n| `agentRuntimeVersion` | `string` | Yes | The Agent Runtime version for this endpoint. Must be between 1 and 5 characters long.|\n| `description` | `string` | No | Optional description for the runtime endpoint |\n| `tags` | `{ [key: string]: string }` | No | Tags for the runtime endpoint |\n\n### Creating a Runtime\n\n#### Option 1: Use an existing image in ECR\n\nReference an image available within ECR.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\n// The runtime by default create ECR permission only for the repository available in the account the stack is being deployed\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create runtime using the built image\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact\n});\n```\n\n#### Option 2: Use a local asset\n\nReference a local directory containing a Dockerfile.\nImages are built from a local Docker context directory (with a Dockerfile), uploaded to Amazon Elastic Container Registry (ECR)\nby the CDK toolkit,and can be naturally referenced in your CDK app.\n\n```typescript fixture=default\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromAsset(\n path.join(__dirname, \"path to agent dockerfile directory\")\n);\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\n#### Option 3: Use direct code deployment\n\nWith 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.\n\nHowever, 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.\n\nWith 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.\n\nFor more information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-code-deploy.html).\n\n```typescript fixture=default\n// S3 bucket containing the agent core\nconst codeBucket = new s3.Bucket(this, \"AgentCode\", {\n bucketName: \"my-code-bucket\",\n removalPolicy: RemovalPolicy.DESTROY, // For demo purposes\n});\n\n// the bucket above needs to contain the agent code\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromS3(\n {\n bucketName: codeBucket.bucketName,\n objectKey: 'deployment_package.zip',\n },\n agentcore.AgentCoreRuntime.PYTHON_3_12,\n ['opentelemetry-instrument', 'main.py']\n);\n\nconst runtimeInstance = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\n#### Option 4: Use an ECR container image URI\n\nReference an ECR container image directly by its URI. This is useful when you have a pre-existing ECR image URI from CloudFormation parameters or cross-stack references. No IAM permissions are automatically granted - you must ensure the runtime has ECR pull permissions.\n\n```typescript fixture=default\n// Direct URI reference\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromImageUri(\n \"123456789012.dkr.ecr.us-east-1.amazonaws.com/my-agent:v1.0.0\"\n);\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\nYou can also use CloudFormation parameters or references:\n\n```typescript fixture=default\n// Using a CloudFormation parameter\nconst imageUriParam = new cdk.CfnParameter(this, \"ImageUri\", {\n type: \"String\",\n description: \"Container image URI for the agent runtime\",\n});\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromImageUri(\n imageUriParam.valueAsString\n);\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\n### Granting Permissions to Invoke Bedrock Models or Inference Profiles\n\nTo grant the runtime permissions to invoke Bedrock models or inference profiles:\n\n```typescript fixture=default\n// Note: This example uses @aws-cdk/aws-bedrock-alpha which must be installed separately\ndeclare const runtime: agentcore.Runtime;\n\n// Define the Bedrock Foundation Model\nconst model = bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_7_SONNET_V1_0;\n\n// Grant the runtime permissions to invoke the model\nmodel.grantInvoke(runtime);\n\n// Create a cross-region inference profile for Claude 3.7 Sonnet\nconst inferenceProfile = bedrock.CrossRegionInferenceProfile.fromConfig({\n geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,\n model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_7_SONNET_V1_0\n});\n\n// Grant the runtime permissions to invoke the inference profile\ninferenceProfile.grantInvoke(runtime);\n```\n\n### Runtime Versioning\n\nAmazon Bedrock AgentCore automatically manages runtime versioning to ensure safe deployments and rollback capabilities.\nWhen you create an agent runtime, AgentCore automatically creates version 1 (V1). Each subsequent update to the\nruntime configuration (such as updating the container image, modifying network settings, or changing protocol configurations)\ncreates a new immutable version. These versions contain complete, self-contained configurations that can be referenced by endpoints,\nallowing you to maintain different versions for different environments or gradually roll out updates.\n\n#### Managing Endpoints and Versions\n\nAmazon Bedrock AgentCore automatically manages runtime versioning to provide safe deployments and rollback capabilities. You can follow\nthe steps below to understand how to use versioning with runtime for controlled deployments across different environments.\n\n##### Step 1: Initial Deployment\n\nWhen you first create an agent runtime, AgentCore automatically creates Version 1 of your runtime. At this point, a DEFAULT endpoint is\nautomatically created that points to Version 1. This DEFAULT endpoint serves as the main access point for your runtime.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\"),\n});\n```\n\n##### Step 2: Creating Custom Endpoints\n\nAfter the initial deployment, you can create additional endpoints for different environments. For example, you might create a \"production\"\nendpoint that explicitly points to Version 1. This allows you to maintain stable access points for specific environments while keeping the\nflexibility to test newer versions elsewhere.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\"),\n});\n\nconst prodEndpoint = runtime.addEndpoint(\"production\", {\n version: \"1\",\n description: \"Stable production endpoint - pinned to v1\"\n});\n```\n\n##### Step 3: Runtime Update Deployment\n\nWhen you update the runtime configuration (such as updating the container image, modifying network settings, or changing protocol\nconfigurations), AgentCore automatically creates a new version (Version 2). Upon this update:\n\n- Version 2 is created automatically with the new configuration\n- The DEFAULT endpoint automatically updates to point to Version 2\n- Any explicitly pinned endpoints (like the production endpoint) remain on their specified versions\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifactNew = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v2.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifactNew,\n});\n```\n\n##### Step 4: Testing with Staging Endpoints\n\nOnce Version 2 exists, you can create a staging endpoint that points to the new version. This staging endpoint allows you to test the\nnew version in a controlled environment before promoting it to production. This separation ensures that production traffic continues\nto use the stable version while you validate the new version.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifactNew = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v2.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifactNew,\n});\n\nconst stagingEndpoint = runtime.addEndpoint(\"staging\", {\n version: \"2\",\n description: \"Staging environment for testing new version\"\n});\n```\n\n##### Step 5: Promoting to Production\n\nAfter thoroughly testing the new version through the staging endpoint, you can update the production endpoint to point to Version 2.\nThis controlled promotion process ensures that you can validate changes before they affect production traffic.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifactNew = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v2.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifactNew,\n});\n\nconst prodEndpoint = runtime.addEndpoint(\"production\", {\n version: \"2\", // New version added here\n description: \"Stable production endpoint\"\n});\n```\n\n### Creating Standalone Runtime Endpoints\n\nRuntimeEndpoint can also be created as a standalone resource.\n\n#### Example: Creating an endpoint for an existing runtime\n\n```typescript fixture=default\n// Reference an existing runtime by its ID\nconst existingRuntimeId = \"abc123-runtime-id\"; // The ID of an existing runtime\n\n// Create a standalone endpoint\nconst endpoint = new agentcore.RuntimeEndpoint(this, \"MyEndpoint\", {\n endpointName: \"production\",\n agentRuntimeId: existingRuntimeId,\n agentRuntimeVersion: \"1\", // Specify which version to use\n description: \"Production endpoint for existing runtime\"\n});\n```\n\n### Runtime Authentication Configuration\n\nThe AgentCore Runtime supports multiple authentication modes to secure access to your agent endpoints. Authentication is configured during runtime creation using the `RuntimeAuthorizerConfiguration` class's static factory methods.\n\n#### IAM Authentication (Default)\n\nIAM authentication is the default mode, when no authorizerConfiguration is set then the underlying service use IAM.\n\n#### Cognito Authentication\n\nTo configure AWS Cognito User Pool authentication:\n\n```typescript fixture=default\ndeclare const userPool: cognito.UserPool;\ndeclare const userPoolClient: cognito.UserPoolClient;\ndeclare const anotherUserPoolClient: cognito.UserPoolClient;\n\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Optional: Create custom claims for additional validation\nconst customClaims = [\n agentcore.RuntimeCustomClaim.withStringValue('department', 'engineering'),\n agentcore.RuntimeCustomClaim.withStringArrayValue('roles', ['admin'], agentcore.CustomClaimOperator.CONTAINS),\n agentcore.RuntimeCustomClaim.withStringArrayValue('permissions', ['read', 'write'], agentcore.CustomClaimOperator.CONTAINS_ANY),\n];\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingCognito(\n userPool, // User Pool (required)\n [userPoolClient, anotherUserPoolClient], // User Pool Clients\n [\"audience1\"], // Allowed Audiences (optional)\n [\"read\", \"write\"], // Allowed Scopes (optional)\n customClaims, // Custom claims (optional) - see Custom Claims Validation section\n ),\n});\n```\n\nYou can configure:\n\n- User Pool: The Cognito User Pool that issues JWT tokens\n- User Pool Clients: One or more Cognito User Pool App Clients that are allowed to access the runtime\n- Allowed audiences: Used to validate that the audiences specified in the Cognito token match or are a subset of the audiences specified in the AgentCore Runtime\n- Allowed scopes: Allow access only if the token contains at least one of the required scopes configured here\n- Custom claims: A set of rules to match specific claims in the incoming token against predefined values for validating JWT tokens\n\n#### JWT Authentication\n\nTo configure custom JWT authentication with your own OpenID Connect (OIDC) provider:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingJWT(\n \"https://example.com/.well-known/openid-configuration\", // Discovery URL (required)\n [\"client1\", \"client2\"], // Allowed Client IDs (optional)\n [\"audience1\"], // Allowed Audiences (optional)\n [\"read\", \"write\"], // Allowed Scopes (optional)\n // Custom claims (optional) - see Custom Claims Validation section below\n ),\n});\n```\n\nYou can configure:\n\n- Discovery URL: Enter the Discovery URL from your identity provider (e.g. Okta, Cognito, etc.), typically found in that provider's documentation. This allows your Agent or Tool to fetch login, downstream resource token, and verification settings.\n- Allowed audiences: This is used to validate that the audiences specified for the OAuth token matches or are a subset of the audiences specified in the AgentCore Runtime.\n- Allowed clients: This is used to validate that the public identifier of the client, as specified in the authorization token, is allowed to access the AgentCore Runtime.\n- Allowed scopes: Allow access only if the token contains at least one of the required scopes configured here.\n- Custom claims: A set of rules to match specific claims in the incoming token against predefined values for validating JWT tokens.\n\n**Note**: The discovery URL must end with `/.well-known/openid-configuration`.\n\n##### Custom Claims Validation\n\nCustom claims allow you to validate additional fields in JWT tokens beyond the standard audience, client, and scope validations. You can create custom claims using the `RuntimeCustomClaim` class:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// String claim - validates that the claim exactly equals the specified value\n// Uses EQUALS operator automatically\nconst departmentClaim = agentcore.RuntimeCustomClaim.withStringValue('department', 'engineering');\n\n// String array claim with CONTAINS operator (default)\n// Validates that the claim array contains a specific string value\n// IMPORTANT: CONTAINS requires exactly one value in the array parameter\nconst rolesClaim = agentcore.RuntimeCustomClaim.withStringArrayValue('roles', ['admin']);\n\n// String array claim with CONTAINS_ANY operator\n// Validates that the claim array contains at least one of the specified values\n// Use this when you want to check for multiple possible values\nconst permissionsClaim = agentcore.RuntimeCustomClaim.withStringArrayValue(\n 'permissions',\n ['read', 'write'],\n agentcore.CustomClaimOperator.CONTAINS_ANY\n);\n\n// Use custom claims in authorizer configuration\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingJWT(\n \"https://example.com/.well-known/openid-configuration\",\n [\"client1\", \"client2\"],\n [\"audience1\"],\n [\"read\", \"write\"],\n [departmentClaim, rolesClaim, permissionsClaim] // Custom claims\n ),\n});\n```\n\n**Custom Claim Rules**:\n\n- **String claims**: Must use the `EQUALS` operator (automatically set). The claim value must exactly match the specified string.\n- **String array claims**: Can use `CONTAINS` (default) or `CONTAINS_ANY` operators:\n - **`CONTAINS`**: Checks if the claim array contains a specific string value. **Requires exactly one value** in the array parameter. For example, `['admin']` will check if the token's claim array contains the string `'admin'`.\n - **`CONTAINS_ANY`**: Checks if the claim array contains at least one of the provided string values. Use this when you want to validate against multiple possible values. For example, `['read', 'write']` will check if the token's claim array contains either `'read'` or `'write'`.\n\n**Example Use Cases**:\n\n- Use `CONTAINS` when you need to verify a user has a specific role: `RuntimeCustomClaim.withStringArrayValue('roles', ['admin'])`\n- Use `CONTAINS_ANY` when you need to verify a user has any of several permissions: `RuntimeCustomClaim.withStringArrayValue('permissions', ['read', 'write'], CustomClaimOperator.CONTAINS_ANY)`\n\n#### OAuth Authentication\n\nTo configure OAuth 2.0 authentication:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingOAuth(\n \"https://github.com/.well-known/openid-configuration\", // Discovery URL (required)\n \"oauth_client_123\", // OAuth Client ID (required)\n [\"audience1\"], // Allowed Audiences (optional)\n [\"openid\", \"profile\"], // Allowed Scopes (optional)\n // Custom claims (optional) - see Custom Claims Validation section\n ),\n});\n```\n\n#### Using a Custom IAM Role\n\nInstead of using the auto-created execution role, you can provide your own IAM role with specific permissions:\nThe auto-created role includes all necessary baseline permissions for ECR access, CloudWatch logging, and X-Ray tracing. When providing a custom role, ensure these permissions are included.\n\n### Runtime Network Configuration\n\nThe AgentCore Runtime supports two network modes for deployment:\n\n#### Public Network Mode (Default)\n\nBy default, runtimes are deployed in PUBLIC network mode, which provides internet access suitable for less sensitive or open-use scenarios:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Explicitly using public network (this is the default)\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n networkConfiguration: agentcore.RuntimeNetworkConfiguration.usingPublicNetwork(),\n});\n```\n\n#### VPC Network Mode\n\nFor enhanced security and network isolation, you can deploy your runtime within a VPC:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create or use an existing VPC\nconst vpc = new ec2.Vpc(this, 'MyVpc', {\n maxAzs: 2,\n});\n\n// Configure runtime with VPC\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n networkConfiguration: agentcore.RuntimeNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },\n // Optionally specify security groups, or one will be created automatically\n // securityGroups: [mySecurityGroup],\n }),\n});\n\n```\n\n#### Managing Security Groups with VPC Configuration\n\nWhen using VPC mode, the Runtime implements `ec2.IConnectable`, allowing you to manage network access using the `connections` property:\n\n```typescript fixture=default\nconst vpc = new ec2.Vpc(this, 'MyVpc', {\n maxAzs: 2,\n});\n\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create runtime with VPC configuration\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n networkConfiguration: agentcore.RuntimeNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },\n }),\n});\n\n// Now you can manage network access using the connections property\n// Allow inbound HTTPS traffic from a specific security group\nconst webServerSecurityGroup = new ec2.SecurityGroup(this, 'WebServerSG', { vpc });\nruntime.connections.allowFrom(webServerSecurityGroup, ec2.Port.tcp(443), 'Allow HTTPS from web servers');\n\n// Allow outbound connections to a database\nconst databaseSecurityGroup = new ec2.SecurityGroup(this, 'DatabaseSG', { vpc });\nruntime.connections.allowTo(databaseSecurityGroup, ec2.Port.tcp(5432), 'Allow PostgreSQL connection');\n\n// Allow outbound HTTPS to anywhere (for external API calls)\nruntime.connections.allowToAnyIpv4(ec2.Port.tcp(443), 'Allow HTTPS outbound');\n```\n\n### Runtime IAM Permissions\n\nThe Runtime construct provides convenient methods for granting IAM permissions to principals that need to invoke the runtime or manage its execution role.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create a runtime\nconst runtime = new agentcore.Runtime(this, \"MyRuntime\", {\n runtimeName: \"my_runtime\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n\n// Create a Lambda function that needs to invoke the runtime\nconst invokerFunction = new lambda.Function(this, \"InvokerFunction\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\nimport boto3\ndef handler(event, context):\n client = boto3.client('bedrock-agentcore')\n # Invoke the runtime...\n `),\n});\n\n// Grant permission to invoke the runtime directly\nruntime.grantInvokeRuntime(invokerFunction);\n\n// Grant permission to invoke the runtime on behalf of a user\n// (requires X-Amzn-Bedrock-AgentCore-Runtime-User-Id header)\nruntime.grantInvokeRuntimeForUser(invokerFunction);\n\n// Grant both invoke permissions (most common use case)\nruntime.grantInvoke(invokerFunction);\n\n// Grant specific custom permissions to the runtime's execution role\nruntime.grant(['bedrock:InvokeModel'], ['arn:aws:bedrock:*:*:*']);\n\n// Add a policy statement to the runtime's execution role\nruntime.addToRolePolicy(new iam.PolicyStatement({\n actions: ['s3:GetObject'],\n resources: ['arn:aws:s3:::my-bucket/*'],\n}));\n```\n\n### Other configuration\n\n#### Lifecycle configuration\n\nThe 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.\n\nYou can configure:\n\n- 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)\n- 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)\n\nFor additional information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-lifecycle-settings.html).\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nnew agentcore.Runtime(this, 'test-runtime', {\n runtimeName: 'test_runtime',\n agentRuntimeArtifact: agentRuntimeArtifact,\n lifecycleConfiguration: {\n idleRuntimeSessionTimeout: Duration.minutes(10),\n maxLifetime: Duration.hours(4),\n },\n});\n```\n\n#### Request header configuration\n\nCustom 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.\n\nFor additional information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-header-allowlist.html).\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nnew agentcore.Runtime(this, 'test-runtime', {\n runtimeName: 'test_runtime',\n agentRuntimeArtifact: agentRuntimeArtifact,\n requestHeaderConfiguration: {\n allowlistedHeaders: ['X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1'],\n },\n});\n```\n\n## Browser\n\nThe 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.\n\nAdditional information about the browser tool can be found in the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/browser-tool.html)\n\n### Browser Network modes\n\nThe Browser construct supports the following network modes:\n\n1. **Public Network Mode** (`BrowserNetworkMode.usingPublicNetwork()`) - Default\n\n - Allows internet access for web browsing and external API calls\n - Suitable for scenarios where agents need to interact with publicly available websites\n - Enables full web browsing capabilities\n - VPC mode is not supported with this option\n\n2. **VPC (Virtual Private Cloud)** (`BrowserNetworkMode.usingVpc()`)\n\n - Select whether to run the browser in a virtual private cloud (VPC).\n - By configuring VPC connectivity, you enable secure access to private resources such as databases, internal APIs, and services within your VPC.\n\n While the VPC itself is mandatory, these are optional:\n - Subnets - if not provided, CDK will select appropriate subnets from the VPC\n - Security Groups - if not provided, CDK will create a default security group\n - Specific subnet selection criteria - you can let CDK choose automatically\n\nFor more information on VPC connectivity for Amazon Bedrock AgentCore Browser, please refer to the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-vpc.html).\n\n### Browser Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `browserCustomName` | `string` | No | The name of the browser. Must start with a letter and can be up to 48 characters long. Pattern: `[a-zA-Z][a-zA-Z0-9_]{0,47}`. If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the browser. Can have up to 200 characters |\n| `networkConfiguration` | `BrowserNetworkConfiguration` | No | Network configuration for browser. Defaults to PUBLIC network mode |\n| `recordingConfig` | `RecordingConfig` | No | Recording configuration for browser. Defaults to no recording |\n| `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 |\n| `tags` | `{ [key: string]: string }` | No | Tags to apply to the browser resource |\n| `browserSigning` | BrowserSigning | No | Browser signing configuration. Defaults to DISABLED |\n\n### Basic Browser Creation\n\n```typescript fixture=default\n// Create a basic browser with public network access\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"A browser for web automation\",\n});\n```\n\n### Browser with Tags\n\n```typescript fixture=default\n// Create a browser with custom tags\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"A browser for web automation with tags\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n tags: {\n Environment: \"Production\",\n Team: \"AI/ML\",\n Project: \"AgentCore\",\n },\n});\n```\n\n### Browser with VPC\n\n```typescript fixture=default\nconst browser = new agentcore.BrowserCustom(this, 'BrowserVpcWithRecording', {\n browserCustomName: 'browser_recording',\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: new ec2.Vpc(this, 'VPC', { restrictDefaultSecurityGroup: false }),\n }),\n});\n```\n\nBrowser exposes a [connections](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) property. This property returns a connections object, which simplifies the process of defining and managing ingress and egress rules for security groups in your AWS CDK applications. Instead of directly manipulating security group rules, you interact with the Connections object of a construct, which then translates your connectivity requirements into the appropriate security group rules. For instance:\n\n```typescript fixture=default\nconst vpc = new ec2.Vpc(this, 'testVPC');\n\nconst browser = new agentcore.BrowserCustom(this, 'test-browser', {\n browserCustomName: 'test_browser',\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n }),\n});\n\nbrowser.connections.addSecurityGroup(new ec2.SecurityGroup(this, 'AdditionalGroup', { vpc }));\n```\n\nSo security groups can be added after the browser construct creation. You can use methods like allowFrom() and allowTo() to grant ingress access to/egress access from a specified peer over a given portRange. The Connections object automatically adds the necessary ingress or egress rules to the security group(s) associated with the calling construct.\n\n### Browser with Recording Configuration\n\n```typescript fixture=default\n// Create an S3 bucket for recordings\nconst recordingBucket = new s3.Bucket(this, \"RecordingBucket\", {\n bucketName: \"my-browser-recordings\",\n removalPolicy: RemovalPolicy.DESTROY, // For demo purposes\n});\n\n// Create browser with recording enabled\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser with recording enabled\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n recordingConfig: {\n enabled: true,\n s3Location: {\n bucketName: recordingBucket.bucketName,\n objectKey: \"browser-recordings/\",\n },\n },\n});\n```\n\n### Browser with Custom Execution Role\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"BrowserExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n managedPolicies: [\n iam.ManagedPolicy.fromAwsManagedPolicyName(\"AmazonBedrockAgentCoreBrowserExecutionRolePolicy\"),\n ],\n});\n\n// Create browser with custom execution role\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser with custom execution role\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n executionRole: executionRole,\n});\n```\n\n### Browser with S3 Recording and Permissions\n\n```typescript fixture=default\n// Create an S3 bucket for recordings\nconst recordingBucket = new s3.Bucket(this, \"RecordingBucket\", {\n bucketName: \"my-browser-recordings\",\n removalPolicy: RemovalPolicy.DESTROY, // For demo purposes\n});\n\n// Create browser with recording enabled\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser with recording enabled\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n recordingConfig: {\n enabled: true,\n s3Location: {\n bucketName: recordingBucket.bucketName,\n objectKey: \"browser-recordings/\",\n },\n },\n});\n\n// The browser construct automatically grants S3 permissions to the execution role\n// when recording is enabled, so no additional IAM configuration is needed\n```\n\n### Browser with Browser signing\n\nAI 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.\n\nAmazon 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.\n\nTo enable the browser to sign requests using the Web Bot Auth protocol, create a browser tool with the browserSigning configuration:\n\n```typescript fixture=default\nconst browser = new agentcore.BrowserCustom(this, 'test-browser', {\n browserCustomName: 'test_browser',\n browserSigning: agentcore.BrowserSigning.ENABLED\n});\n```\n\n### Browser IAM Permissions\n\nThe Browser construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a browser\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser for web automation\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n});\n\n// Create a role that needs access to the browser\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\nbrowser.grantRead(userRole);\n\n// Grant use permissions (Start, Update, Stop actions)\nbrowser.grantUse(userRole);\n\n// Grant specific custom permissions\nbrowser.grant(userRole, \"bedrock-agentcore:GetBrowserSession\");\n```\n\n## Code Interpreter\n\nThe Amazon Bedrock AgentCore Code Interpreter enables AI agents to write and execute code securely in sandbox environments, enhancing their accuracy and expanding their ability to solve complex end-to-end tasks. This is critical in Agentic AI applications where the agents may execute arbitrary code that can lead to data compromise or security risks. The AgentCore Code Interpreter tool provides secure code execution, which helps you avoid running into these issues.\n\nFor more information about code interpreter, please refer to the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/code-interpreter-tool.html)\n\n### Code Interpreter Network Modes\n\nThe Code Interpreter construct supports the following network modes:\n\n1. **Public Network Mode** (`CodeInterpreterNetworkMode.usingPublicNetwork()`) - Default\n\n - Allows internet access for package installation and external API calls\n - Suitable for development and testing environments\n - Enables downloading Python packages from PyPI\n\n2. **Sandbox Network Mode** (`CodeInterpreterNetworkMode.usingSandboxNetwork()`)\n - Isolated network environment with no internet access\n - Suitable for production environments with strict security requirements\n - Only allows access to pre-installed packages and local resources\n\n3. **VPC (Virtual Private Cloud)** (`CodeInterpreterNetworkMode.usingVpc()`)\n - Select whether to run the browser in a virtual private cloud (VPC).\n - By configuring VPC connectivity, you enable secure access to private resources such as databases, internal APIs, and services within your VPC.\n\n While the VPC itself is mandatory, these are optional:\n - Subnets - if not provided, CDK will select appropriate subnets from the VPC\n - Security Groups - if not provided, CDK will create a default security group\n - Specific subnet selection criteria - you can let CDK choose automatically\n\nFor more information on VPC connectivity for Amazon Bedrock AgentCore Browser, please refer to the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-vpc.html).\n\n### Code Interpreter Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `codeInterpreterCustomName` | `string` | No | The name of the code interpreter. Must start with a letter and can be up to 48 characters long. Pattern: `[a-zA-Z][a-zA-Z0-9_]{0,47}`. If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the code interpreter. Can have up to 200 characters |\n| `executionRole` | `iam.IRole` | No | The IAM role that provides permissions for the code interpreter to access AWS services. A new role will be created if not provided |\n| `networkConfiguration` | `CodeInterpreterNetworkConfiguration` | No | Network configuration for code interpreter. Defaults to PUBLIC network mode |\n| `tags` | `{ [key: string]: string }` | No | Tags to apply to the code interpreter resource |\n\n### Basic Code Interpreter Creation\n\n```typescript fixture=default\n// Create a basic code interpreter with public network access\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_code_interpreter\",\n description: \"A code interpreter for Python execution\",\n});\n```\n\n### Code Interpreter with VPC\n\n```typescript fixture=default\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: new ec2.Vpc(this, 'VPC', { restrictDefaultSecurityGroup: false }),\n }),\n});\n```\n\nCode Interpreter exposes a [connections](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) property. This property returns a connections object, which simplifies the process of defining and managing ingress and egress rules for security groups in your AWS CDK applications. Instead of directly manipulating security group rules, you interact with the Connections object of a construct, which then translates your connectivity requirements into the appropriate security group rules. For instance:\n\n```typescript fixture=default\nconst vpc = new ec2.Vpc(this, 'testVPC');\n\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n }),\n});\n\ncodeInterpreter.connections.addSecurityGroup(new ec2.SecurityGroup(this, 'AdditionalGroup', { vpc }));\n```\n\nSo security groups can be added after the browser construct creation. You can use methods like allowFrom() and allowTo() to grant ingress access to/egress access from a specified peer over a given portRange. The Connections object automatically adds the necessary ingress or egress rules to the security group(s) associated with the calling construct.\n\n### Code Interpreter with Sandbox Network Mode\n\n```typescript fixture=default\n// Create code interpreter with sandbox network mode (isolated)\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingSandboxNetwork(),\n});\n```\n\n### Code Interpreter with Custom Execution Role\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"CodeInterpreterExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n});\n\n// Create code interpreter with custom execution role\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_code_interpreter\",\n description: \"Code interpreter with custom execution role\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingPublicNetwork(),\n executionRole: executionRole,\n});\n```\n\n### Code Interpreter IAM Permissions\n\nThe Code Interpreter construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a code interpreter\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_code_interpreter\",\n description: \"Code interpreter for Python execution\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingPublicNetwork(),\n});\n\n// Create a role that needs access to the code interpreter\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\ncodeInterpreter.grantRead(userRole);\n\n// Grant use permissions (Start, Invoke, Stop actions)\ncodeInterpreter.grantUse(userRole);\n\n// Grant specific custom permissions\ncodeInterpreter.grant(userRole, \"bedrock-agentcore:GetCodeInterpreterSession\");\n```\n\n### Code interpreter with tags\n\n```typescript fixture=default\n// Create code interpreter with sandbox network mode (isolated)\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingPublicNetwork(),\n tags: {\n Environment: \"Production\",\n Team: \"AI/ML\",\n Project: \"AgentCore\",\n },\n});\n```\n\n## Gateway\n\nThe Gateway construct provides a way to create Amazon Bedrock Agent Core Gateways, which serve as integration points between agents and external services.\n\n### Gateway Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `gatewayName` | `string` | No | The name of the gateway. Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen). Maximum 100 characters. If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the gateway. Maximum 200 characters |\n| `protocolConfiguration` | `IGatewayProtocolConfig` | No | The protocol configuration for the gateway. Defaults to MCP protocol |\n| `authorizerConfiguration` | `IGatewayAuthorizerConfig` | No | The authorizer configuration for the gateway. Defaults to Cognito |\n| `exceptionLevel` | `GatewayExceptionLevel` | No | The verbosity of exception messages. Use DEBUG mode to see granular exception messages |\n| `kmsKey` | `kms.IKey` | No | The AWS KMS key used to encrypt data associated with the gateway |\n| `role` | `iam.IRole` | No | The IAM role that provides permissions for the gateway to access AWS services. A new role will be created if not provided |\n| `tags` | `{ [key: string]: string }` | No | Tags for the gateway. A list of key:value pairs of tags to apply to this Gateway resource |\n\n### Basic Gateway Creation\n\nThe protocol configuration defaults to MCP and the inbound auth configuration uses Cognito (it is automatically created on your behalf).\n\n```typescript fixture=default\n// Create a basic gateway with default MCP protocol and Cognito authorizer\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n```\n\n### Protocol configuration\n\nCurrently MCP is the only protocol available. To configure it, use the `protocol` property with `McpProtocolConfiguration`:\n\n- Instructions: Guidance for how to use the gateway with your tools\n- Semantic search: Smart tool discovery that finds the right tools without typical limits. It improves accuracy by finding relevant tools based on context\n- Supported versions: Which MCP protocol versions the gateway can use\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n});\n```\n\n### Inbound authorization\n\nBefore you create your gateway, you must set up inbound authorization. Inbound authorization validates users who attempt to access targets through\nyour AgentCore gateway. By default, if not provided, the construct will create and configure Cognito as the default identity provider\n(inbound Auth setup). AgentCore supports the following types of inbound authorization:\n\n**JSON Web Token (JWT)** – A secure and compact token used for authorization. After creating the JWT, you specify it as the authorization\nconfiguration when you create the gateway. You can create a JWT with any of the identity providers at Provider setup and configuration.\n\nYou can configure a custom authorization provider using the `authorizerConfiguration` property with `GatewayAuthorizer.usingCustomJwt()`.\nYou need to specify an OAuth discovery server and client IDs/audiences when you create the gateway. You can specify the following:\n\n- Discovery Url — String that must match the pattern ^.+/\\.well-known/openid-configuration$ for OpenID Connect discovery URLs\n- At least one of the below options depending on the chosen identity provider.\n- Allowed audiences — List of allowed audiences for JWT tokens\n- Allowed clients — List of allowed client identifiers\n- Allowed scopes — List of allowed scopes for JWT tokens\n- Custom claims — Optional custom claim validations (see Custom Claims Validation section below)\n\n```typescript fixture=default\n\n// Optional: Create custom claims (CustomClaimOperator and GatewayCustomClaim from agentcore)\nconst customClaims = [\n agentcore.GatewayCustomClaim.withStringValue('department', 'engineering'),\n agentcore.GatewayCustomClaim.withStringArrayValue('roles', ['admin'], agentcore.CustomClaimOperator.CONTAINS),\n agentcore.GatewayCustomClaim.withStringArrayValue('permissions', ['read', 'write'], agentcore.CustomClaimOperator.CONTAINS_ANY),\n];\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n customClaims: customClaims, // Optional custom claims\n }),\n});\n```\n\n**IAM** – Authorizes through the credentials of the AWS IAM identity trying to access the gateway.\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingAwsIam(),\n});\n\n// Grant access to a Lambda function's role\nconst lambdaRole = new iam.Role(this, \"LambdaRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// The Lambda needs permission to invoke the gateway\ngateway.grantInvoke(lambdaRole);\n```\n\n**Cognito with M2M (Machine-to-Machine) Authentication (Default)** – When no authorizer is specified, the construct automatically creates a Cognito User Pool configured for OAuth 2.0 client credentials flow. This enables machine-to-machine authentication suitable for AI agents and service-to-service communication.\n\nFor more information, see [Setting up Amazon Cognito for Gateway inbound authorization](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity-idp-cognito.html).\n\n```typescript fixture=default\n// Create a gateway with default Cognito M2M authorizer\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// Access the Cognito resources for authentication setup\nconst userPool = gateway.userPool;\nconst userPoolClient = gateway.userPoolClient;\n\n// Get the token endpoint URL and OAuth scopes for client credentials flow\nconst tokenEndpointUrl = gateway.tokenEndpointUrl;\nconst oauthScopes = gateway.oauthScopes;\n// oauthScopes are in the format: ['{resourceServerId}/read', '{resourceServerId}/write']\n```\n\n**Using Cognito User Pool Explicitly with Custom Claims** – You can also use an existing Cognito User Pool with custom claims:\n\n```typescript fixture=default\ndeclare const userPool: cognito.UserPool;\ndeclare const userPoolClient: cognito.UserPoolClient;\n\n// Optional: Create custom claims (CustomClaimOperator and GatewayCustomClaim from agentcore)\nconst customClaims = [\n agentcore.GatewayCustomClaim.withStringValue('department', 'engineering'),\n agentcore.GatewayCustomClaim.withStringArrayValue('roles', ['admin'], agentcore.CustomClaimOperator.CONTAINS),\n agentcore.GatewayCustomClaim.withStringArrayValue('permissions', ['read', 'write'], agentcore.CustomClaimOperator.CONTAINS_ANY),\n];\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCognito({\n userPool: userPool,\n allowedClients: [userPoolClient],\n allowedAudiences: [\"audience1\"],\n allowedScopes: [\"read\", \"write\"],\n customClaims: customClaims, // Optional custom claims\n }),\n});\n```\n\nTo authenticate with the gateway, request an access token using the client credentials flow and use it to call Gateway endpoints. For more information about the token endpoint, see [The token issuer endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html).\n\nThe following is an example of a token request using curl:\n\n```bash\ncurl -X POST \"${TOKEN_ENDPOINT_URL}\" \\\n -H \"Content-Type: application/x-www-form-urlencoded\" \\\n -d \"grant_type=client_credentials\" \\\n -d \"client_id=${USER_POOL_CLIENT_ID}\" \\\n -d \"client_secret=${CLIENT_SECRET}\" \\\n -d \"scope=${OAUTH_SCOPES}\"\n```\n\n### Gateway with KMS Encryption\n\nYou can provide a KMS key, and configure the authorizer as well as the protocol configuration.\n\n```typescript fixture=default\n// Create a KMS key for encryption\nconst encryptionKey = new kms.Key(this, \"GatewayEncryptionKey\", {\n enableKeyRotation: true,\n description: \"KMS key for gateway encryption\",\n});\n\n// Create gateway with KMS encryption\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-encrypted-gateway\",\n description: \"Gateway with KMS encryption\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n }),\n kmsKey: encryptionKey,\n exceptionLevel: agentcore.GatewayExceptionLevel.DEBUG,\n});\n```\n\n### Gateway with Custom Execution Role\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"GatewayExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n managedPolicies: [\n iam.ManagedPolicy.fromAwsManagedPolicyName(\"AmazonBedrockAgentCoreGatewayExecutionRolePolicy\"),\n ],\n});\n\n// Create gateway with custom execution role\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n description: \"Gateway with custom execution role\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n }),\n role: executionRole,\n});\n```\n\n### Gateway IAM Permissions\n\nThe Gateway construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a gateway\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n description: \"Gateway for external service integration\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n }),\n});\n\n// Create a role that needs access to the gateway\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\ngateway.grantRead(userRole);\n\n// Grant manage permissions (Create, Update, Delete actions)\ngateway.grantManage(userRole);\n\n// Grant specific custom permissions\ngateway.grant(userRole, \"bedrock-agentcore:GetGateway\");\n```\n\n## Gateway Target\n\nAfter Creating gateways, you can add targets which define the tools that your gateway will host. Gateway supports multiple target\ntypes including Lambda functions and API specifications (either OpenAPI schemas or Smithy models). Gateway allows you to attach multiple\ntargets to a Gateway and you can change the targets / tools attached to a gateway at any point. Each target can have its own\ncredential provider attached enabling you to securely access targets whether they need IAM, API Key, or OAuth credentials.\n\n### Gateway Target Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `gatewayTargetName` | `string` | No | The name of the gateway target. Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen). If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the gateway target. Maximum 200 characters |\n| `gateway` | `IGateway` | Yes | The gateway this target belongs to |\n| `targetConfiguration` | `ITargetConfiguration` | Yes | The target configuration (Lambda, OpenAPI, or Smithy). **Note:** Users typically don't create this directly. When using convenience methods like `GatewayTarget.forLambda()`, `GatewayTarget.forOpenApi()`, `GatewayTarget.forSmithy()` or the gateway's `addLambdaTarget()`, `addOpenApiTarget()`, `addSmithyTarget()` methods, this configuration is created internally for you. Only needed when using the GatewayTarget constructor directly for [advanced scenarios](#advanced-usage-direct-configuration-for-gateway-target). |\n| `credentialProviderConfigurations` | `IGatewayCredentialProvider[]` | No | Credential providers for authentication. Defaults to `[GatewayCredentialProvider.fromIamRole()]`. Use `GatewayCredentialProvider.fromApiKeyIdentityArn()`, `GatewayCredentialProvider.fromOauthIdentityArn()`, or `GatewayCredentialProvider.fromIamRole()` |\n| `validateOpenApiSchema` | `boolean` | No | (OpenAPI targets only) Whether to validate the OpenAPI schema at synthesis time. Defaults to `true`. Only applies to inline and local asset schemas. For more information refer here <https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-schema-openapi.html> |\n\nThis approach gives you full control over the configuration but is typically not necessary for most use cases.\n\n### Targets types\n\nYou can create the following targets types:\n\n**Lambda Target**: Lambda targets allow you to connect your gateway to AWS Lambda functions that implement your tools. This is useful\nwhen you want to execute custom code in response to tool invocations.\n\n- Supports GATEWAY_IAM_ROLE credential provider only\n- Ideal for custom serverless function integration\n- Need tool schema (tool schema is a blueprint that describes the functions your Lambda provides to AI agents).\n The construct provide [3 ways to upload a tool schema to Lambda target](#tools-schema-for-lambda-target)\n- When using the default IAM authentication (no `credentialProviderConfigurations` specified),\n the construct automatocally grants the gateway role permission to invoke your Lambda function (`lambda:InvokeFunction`).\n\n**OpenAPI Schema Target** : OpenAPI widely used standard for describing RESTful APIs. Gateway supports OpenAPI 3.0\nspecifications for defining API targets. It connects to REST APIs using OpenAPI specifications\n\n- Supports OAUTH and API_KEY credential providers (Do not support IAM, you must provide `credentialProviderConfigurations`)\n- Ideal for integrating with external REST services\n- Need API schema. The construct provide [3 ways to upload a API schema to OpenAPI target](#api-schema-for-openapi-and-smithy-target)\n\n**Smithy Model Target** : Smithy is a language for defining services and software development kits (SDKs). Smithy models provide\na more structured approach to defining APIs compared to OpenAPI, and are particularly useful for connecting to AWS services.\nAgentCore Gateway supports built-in AWS service models only. It connects to services using Smithy model definitions\n\n- Supports OAUTH and API_KEY credential providers\n- Ideal for AWS service integrations\n- Need API schema. The construct provide 3 ways to upload a API schema to Smity target\n- When using the default IAM authentication (no `credentialProviderConfigurations` specified), The construct only\n grants permission to read the Smithy schema file from S3. You MUST manually grant permissions for the gateway\n role to invoke the actual Smithy API endpoints\n\n> Note: For Smithy model targets that access AWS services, your Gateway's execution role needs permissions to access those services.\nFor example, for a DynamoDB target, your execution role needs permissions to perform DynamoDB operations.\nThis is not managed by the construct due to the large number of options. Please refer to\n[Smithy Model Permission](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-prerequisites-permissions.html) for example.\n\n**MCP Server Target**: Model Context Protocol (MCP) servers provide external tools, data access, and custom functions for AI agents.\nMCP servers enable agents to interact with external systems and services through a standardized protocol. Gateway automatically\ndiscovers and indexes available tools from MCP servers through synchronization.\n\n**Key Features:**\n\n- Requires explicit authentication configuration (OAuth2 recommended, empty array for NoAuth)\n- Ideal for connecting to external MCP-compliant servers\n- The endpoint must use HTTPS protocol\n- Supported MCP protocol versions: 2025-06-18, 2025-03-26\n- Automatic tool discovery through synchronization\n\n**Synchronization Behavior:**\n\nMCP Server targets require synchronization to discover and index available tools:\n\n- **Implicit Synchronization (Automatic)**: Tool discovery happens automatically during:\n - Target creation (`CreateGatewayTarget`)\n - Target updates (`UpdateGatewayTarget`)\n - The Gateway calls the MCP server's `tools/list` endpoint and indexes tools without user intervention\n\n- **Explicit Synchronization (Manual)**: When the MCP server's tools change independently (new tools added, schemas modified, tools removed):\n - The Gateway's tool catalog becomes stale\n - Call the `SynchronizeGatewayTargets` API to refresh the catalog\n - Use the `grantSync()` method to grant permissions to Lambda functions, CI/CD pipelines, or scheduled tasks that will trigger synchronization\n\n**Authentication & Permissions:**\n\nWhen using OAuth2, the Gateway service role automatically receives:\n\n- `bedrock-agentcore:GetWorkloadAccessToken`\n- `bedrock-agentcore:GetResourceOauth2Token`\n- `secretsmanager:GetSecretValue`\n- KMS decrypt (if secrets are encrypted)\n\nFor explicit synchronization, use `grantSync()` to grant `bedrock-agentcore:SynchronizeGatewayTargets` permission to your operator roles.\n\n> For more information, refer to the [MCP Server Target documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-target-MCPservers.html).\n\n### Understanding Tool Naming\n\nWhen tools are exposed through gateway targets, AgentCore Gateway prefixes each tool name with the target name to ensure uniqueness across multiple targets. This is important to understand when building your application logic.\n\n**Naming Pattern:**\n\n**Example:**\n\nIf your target is named `my-lambda-target` and provides a tool called `calculate_price`, agents will discover and invoke it as `my-lambda-target__calculate_price`.\n\n**Important Considerations:**\n\n- **For Lambda Targets**: Your Lambda handler must strip the target name prefix before processing the tool request. The full tool name (with prefix) is sent in the event.\n- **For MCP Server Targets**: The MCP server receives tool calls with the prefixed name from the gateway.\n- **For OpenAPI/Smithy Targets**: The gateway handles the prefix automatically when mapping to API operations based on the `operationId`.\n\nThis naming convention ensures that:\n\n- Tools from different targets don't collide even if they have the same name\n- Agents can access tools from multiple targets through a single gateway\n- Tool names remain unique in the unified tool catalog\n\nFor more details, see the [Gateway Tool Naming Documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-tool-naming.html).\n\n### Tools schema For Lambda target\n\nThe lambda target need tools schema to understand the fuunction lambda provides. You can upload the tool schema by following 3 ways:\n\n- From a local asset file\n\n```typescript\nconst toolSchema = agentcore.ToolSchema.fromLocalAsset(\n path.join(__dirname, \"schemas\", \"my-tool-schema.json\")\n );\n```\n\n- From an existing S3 file:\n\n```typescript\n\nconst toolSchema = agentcore.ToolSchema.fromS3File(\n s3.Bucket.fromBucketName(this, \"SchemasBucket\", \"my-schemas-bucket\"),\n \"tools/complex-tool-schema.json\",\n \"123456789012\"\n );\n```\n\n- From Inline:\n\n```typescript\nconst toolSchema = agentcore.ToolSchema.fromInline([{\n name: \"hello_world\",\n description: \"A simple hello world tool\",\n inputSchema: {\n type: agentcore.SchemaDefinitionType.OBJECT,\n properties: {\n name: {\n type: agentcore.SchemaDefinitionType.STRING,\n description: \"The name to greet\",\n },\n },\n required: [\"name\"],\n },\n }]);\n\n```\n\n### Api schema For OpenAPI and Smithy target\n\nThe OpenAPI and Smithy target need API Schema. The Gateway construct provide three ways to upload API schema for your target:\n\n- From a local asset file (requires binding to scope):\n\n```typescript fixture=default\n// When using ApiSchema.fromLocalAsset, you must bind the schema to a scope\nconst schema = agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, \"mySchema.yml\"));\n\nschema.bind(this);\n```\n\n- From an inline schema:\n\n```typescript fixture=default\nconst inlineSchema = agentcore.ApiSchema.fromInline(`\nopenapi: 3.0.3\ninfo:\n title: Library API\n version: 1.0.0\npaths:\n /search:\n get:\n summary: Search for books\n operationId: searchBooks\n parameters:\n - name: query\n in: query\n required: true\n schema:\n type: string\n`);\n```\n\n- From an existing S3 file:\n\n```typescript fixture=default\nconst bucket = s3.Bucket.fromBucketName(this, \"ExistingBucket\", \"my-schema-bucket\");\nconst s3Schema = agentcore.ApiSchema.fromS3File(bucket, \"schemas/action-group.yaml\");\n```\n\n### Outbound auth\n\nOutbound authorization lets Amazon Bedrock AgentCore gateways securely access gateway targets on behalf of users authenticated\nand authorized during Inbound Auth.\n\nAgentCore Gateway supports the following types of outbound authorization:\n\n**IAM-based outbound authorization** – The gateway uses its execution role to authenticate with AWS services. This is the default\n and most common approach for Lambda targets and AWS service integrations.\n\n**2-legged OAuth (OAuth 2LO)** – Use OAuth 2.0 two-legged flow (2LO) for targets that require OAuth authentication.\nThe gateway authenticates on its own behalf, not on behalf of a user.\n\n**API key** – Use the AgentCore service/AWS console to generate an API key to authenticate access to the gateway target.\n\n**Note > You need to set up the outbound identity before you can create a gateway target.\n\n### Basic Gateway Target Creation\n\nYou can create targets in two ways: using the static factory methods on `GatewayTarget` or using the convenient `addTarget` methods on the gateway instance.\n\n#### Using addTarget methods (Recommended)\n\nBelow are the examples on how you can create Lambda , Smity and OpenAPI target using `addTarget` method.\n\n```typescript fixture=default\n// Create a gateway first\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst lambdaFunction = new lambda.Function(this, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_22_X,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\n exports.handler = async (event) => {\n return {\n statusCode: 200,\n body: JSON.stringify({ message: 'Hello from Lambda!' })\n };\n };\n `),\n});\n\nconst lambdaTarget = gateway.addLambdaTarget(\"MyLambdaTarget\", {\n gatewayTargetName: \"my-lambda-target\",\n description: \"Lambda function target\",\n lambdaFunction: lambdaFunction,\n toolSchema: agentcore.ToolSchema.fromInline([\n {\n name: \"hello_world\",\n description: \"A simple hello world tool\",\n inputSchema: {\n type: agentcore.SchemaDefinitionType.OBJECT,\n properties: {\n name: {\n type: agentcore.SchemaDefinitionType.STRING,\n description: \"The name to greet\",\n },\n },\n required: [\"name\"],\n },\n },\n ]),\n});\n```\n\n- OpenAPI Target\n\n``` typescript\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// These ARNs are returned when creating the API key credential provider via Console or API\nconst apiKeyProviderArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/apikeycredentialprovider/my-apikey\"\nconst apiKeySecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-apikey-secret-abc123\"\n\nconst bucket = s3.Bucket.fromBucketName(this, \"ExistingBucket\", \"my-schema-bucket\");\nconst s3mySchema = agentcore.ApiSchema.fromS3File(bucket, \"schemas/myschema.yaml\");\n\n// Add an OpenAPI target directly to the gateway\nconst target = gateway.addOpenApiTarget(\"MyTarget\", {\n gatewayTargetName: \"my-api-target\",\n description: \"Target for external API integration\",\n apiSchema: s3mySchema,\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromApiKeyIdentityArn({\n providerArn: apiKeyProviderArn,\n secretArn: apiKeySecretArn,\n credentialLocation: agentcore.ApiKeyCredentialLocation.header({\n credentialParameterName: \"X-API-Key\",\n }),\n }),\n ],\n});\n\n// This make sure your s3 bucket is available before target\ntarget.node.addDependency(bucket);\n```\n\n- Smithy Target\n\n```typescript fixture=default\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst smithySchema = agentcore.ApiSchema.fromLocalAsset(\n path.join(__dirname, \"models\", \"smithy-model.json\")\n);\nsmithySchema.bind(this);\n\nconst smithyTarget = gateway.addSmithyTarget(\"MySmithyTarget\", {\n gatewayTargetName: \"my-smithy-target\",\n description: \"Smithy model target\",\n smithyModel: smithySchema,\n\n});\n```\n\n- MCP Server Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// OAuth2 authentication (recommended)\n// Note: Create the OAuth provider using AWS console or Identity L2 construct when available\nconst oauthProviderArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/oauth2credentialprovider/my-oauth\";\nconst oauthSecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-oauth-secret-abc123\";\n\n// Add an MCP server target directly to the gateway\nconst mcpTarget = gateway.addMcpServerTarget(\"MyMcpServer\", {\n gatewayTargetName: \"my-mcp-server\",\n description: \"External MCP server integration\",\n endpoint: \"https://my-mcp-server.example.com\",\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromOauthIdentityArn({\n providerArn: oauthProviderArn,\n secretArn: oauthSecretArn,\n scopes:['mcp-runtime-server/invoke']\n }),\n ],\n});\n\n// Grant sync permission to a Lambda function that will trigger synchronization\nconst syncFunction = new lambda.Function(this, \"SyncFunction\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\nimport boto3\n\ndef handler(event, context):\n client = boto3.client('bedrock-agentcore')\n response = client.synchronize_gateway_targets(\n gatewayIdentifier=event['gatewayId'],\n targetIds=[event['targetId']]\n )\n return response\n `),\n});\n\nmcpTarget.grantSync(syncFunction);\n```\n\n#### Using static factory methods\n\nCreate Gateway target using static convienence method.\n\n- Lambda Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst lambdaFunction = new lambda.Function(this, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_22_X,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\n exports.handler = async (event) => {\n return {\n statusCode: 200,\n body: JSON.stringify({ message: 'Hello from Lambda!' })\n };\n };\n `),\n});\n\n// Create a gateway target with Lambda and tool schema\nconst target = agentcore.GatewayTarget.forLambda(this, \"MyLambdaTarget\", {\n gatewayTargetName: \"my-lambda-target\",\n description: \"Target for Lambda function integration\",\n gateway: gateway,\n lambdaFunction: lambdaFunction,\n toolSchema: agentcore.ToolSchema.fromLocalAsset(\n path.join(__dirname, \"schemas\", \"my-tool-schema.json\")\n ),\n});\n```\n\n- OpenAPI Target\n\n```typescript fixture=default\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// outbound auth (Use AWS console to create it, Once Identity L2 construct is available you can use it to create identity)\nconst apiKeyIdentityArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/apikeycredentialprovider/my-apikey\"\nconst apiKeySecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-apikey-secret-abc123\"\n\nconst opneapiSchema = agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, \"mySchema.yml\"));\nopneapiSchema.bind(this);\n\n// Create a gateway target with OpenAPI Schema\nconst target = agentcore.GatewayTarget.forOpenApi(this, \"MyTarget\", {\n gatewayTargetName: \"my-api-target\",\n description: \"Target for external API integration\",\n gateway: gateway, // Note: you need to pass the gateway reference\n apiSchema: opneapiSchema,\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromApiKeyIdentityArn({\n providerArn: apiKeyIdentityArn,\n secretArn: apiKeySecretArn\n }),\n ],\n});\n\n```\n\n- Smithy Target\n\n```typescript fixture=default\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst smithySchema = agentcore.ApiSchema.fromLocalAsset(\n path.join(__dirname, \"models\", \"smithy-model.json\")\n);\nsmithySchema.bind(this);\n\n// Create a gateway target with Smithy Model and OAuth\nconst target = agentcore.GatewayTarget.forSmithy(this, \"MySmithyTarget\", {\n gatewayTargetName: \"my-smithy-target\",\n description: \"Target for Smithy model integration\",\n gateway: gateway,\n smithyModel: smithySchema,\n});\n\n```\n\n- MCP Server Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// OAuth2 authentication (recommended)\n// Note: Create the OAuth provider using AWS console or Identity L2 construct when available\nconst oauthProviderArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/oauth2credentialprovider/my-oauth\";\nconst oauthSecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-oauth-secret-abc123\";\n\n// Create a gateway target with MCP Server\nconst mcpTarget = agentcore.GatewayTarget.forMcpServer(this, \"MyMcpServer\", {\n gatewayTargetName: \"my-mcp-server\",\n description: \"External MCP server integration\",\n gateway: gateway,\n endpoint: \"https://my-mcp-server.example.com\",\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromOauthIdentityArn({\n providerArn: oauthProviderArn,\n secretArn: oauthSecretArn,\n scopes:['mcp-runtime-server/invoke']\n }),\n ],\n});\n```\n\n### Advanced Usage: Direct Configuration for gateway target\n\nFor advanced use cases where you need full control over the target configuration, you can create configurations manually using the static factory methods and use the GatewayTarget constructor directly.\n\n#### Configuration Factory Methods\n\nEach target type has a corresponding configuration class with a static `create()` method:\n\n- **Lambda**: `LambdaTargetConfiguration.create(lambdaFunction, toolSchema)`\n- **OpenAPI**: `OpenApiTargetConfiguration.create(apiSchema, validateSchema?)`\n- **Smithy**: `SmithyTargetConfiguration.create(smithyModel)`\n\n#### Example: Lambda Target with Custom Configuration\n\n```typescript\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst myLambdaFunction = new lambda.Function(this, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_22_X,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\n exports.handler = async (event) => ({ statusCode: 200 });\n `),\n});\n\nconst myToolSchema = agentcore.ToolSchema.fromInline([{\n name: \"my_tool\",\n description: \"My custom tool\",\n inputSchema: {\n type: agentcore.SchemaDefinitionType.OBJECT,\n properties: {},\n },\n}]);\n\n// Create a custom Lambda configuration\nconst customConfig = agentcore.LambdaTargetConfiguration.create(\n myLambdaFunction,\n myToolSchema\n);\n\n// Use the GatewayTarget constructor directly\nconst target = new agentcore.GatewayTarget(this, \"AdvancedTarget\", {\n gateway: gateway,\n gatewayTargetName: \"advanced-target\",\n targetConfiguration: customConfig, // Manually created configuration\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromIamRole()\n ]\n});\n```\n\nThis approach gives you full control over the configuration but is typically not necessary for most use cases. The convenience methods (`GatewayTarget.forLambda()`, `GatewayTarget.forOpenApi()`, `GatewayTarget.forSmithy()`) handle all of this internally.\n\n### Gateway Interceptors\n\nGateway interceptors allow you to run custom code during each gateway invocation to implement fine-grained access control, transform requests and responses, or implement custom authorization logic. A gateway can have at most one REQUEST interceptor and one RESPONSE interceptor.\n\n**Interceptor Types:**\n\n- **REQUEST interceptors**: Execute before the gateway calls the target. Useful for request validation, transformation, or custom authorization\n- **RESPONSE interceptors**: Execute after the target responds but before the gateway sends the response back. Useful for response transformation, filtering, or adding custom headers\n\n**Security Best Practices:**\n\n1. Keep `passRequestHeaders` disabled unless absolutely necessary (default: false)\n2. Implement idempotent Lambda functions (gateway may retry on failures)\n3. Restrict gateway execution role to specific Lambda functions\n4. Avoid logging sensitive information in your interceptor\n\nFor more information, see the [Gateway Interceptors documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-interceptors.html).\n\n#### Adding Interceptors via Constructor\n\n```typescript fixture=default\n// Create Lambda functions for interceptors\nconst requestInterceptorFn = new lambda.Function(this, \"RequestInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Validate and transform request\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayRequest\": event[\"mcp\"][\"gatewayRequest\"]\n }\n }\n `),\n});\n\nconst responseInterceptorFn = new lambda.Function(this, \"ResponseInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Filter or transform response\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayResponse\": event[\"mcp\"][\"gatewayResponse\"]\n }\n }\n `),\n});\n\n// Create gateway with interceptors\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n interceptorConfigurations: [\n agentcore.LambdaInterceptor.forRequest(requestInterceptorFn, {\n passRequestHeaders: true // Only if you need to inspect headers\n }),\n agentcore.LambdaInterceptor.forResponse(responseInterceptorFn)\n ]\n});\n```\n\n**Automatic Permission Granting:**\n\nWhen you add a Lambda interceptor to a gateway (either via constructor or `addInterceptor()`), the gateway's IAM role automatically receives `lambda:InvokeFunction` permission on the Lambda function. This permission grant happens internally during the bind process - you do not need to manually configure these IAM permissions.\n\n#### Adding Interceptors Dynamically\n\n```typescript fixture=default\n// Create a gateway first\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// Create Lambda functions for interceptors\nconst requestInterceptorFn = new lambda.Function(this, \"RequestInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Custom request validation logic\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayRequest\": event[\"mcp\"][\"gatewayRequest\"]\n }\n }\n `),\n});\n\nconst responseInterceptorFn = new lambda.Function(this, \"ResponseInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Filter sensitive data from response\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayResponse\": event[\"mcp\"][\"gatewayResponse\"]\n }\n }\n `),\n});\n\ngateway.addInterceptor(\n agentcore.LambdaInterceptor.forRequest(requestInterceptorFn, {\n passRequestHeaders: false // Default, headers not passed for security\n })\n);\n\ngateway.addInterceptor(\n agentcore.LambdaInterceptor.forResponse(responseInterceptorFn)\n);\n```\n\n### Gateway Target IAM Permissions\n\nThe Gateway Target construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a gateway and target\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst smithySchema = agentcore.ApiSchema.fromLocalAsset(\n path.join(__dirname, \"models\", \"smithy-model.json\")\n);\nsmithySchema.bind(this);\n\n// Create a gateway target with Smithy Model and OAuth\nconst target = agentcore.GatewayTarget.forSmithy(this, \"MySmithyTarget\", {\n gatewayTargetName: \"my-smithy-target\",\n description: \"Target for Smithy model integration\",\n gateway: gateway,\n smithyModel: smithySchema,\n});\n\n// Create a role that needs access to the gateway target\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\ntarget.grantRead(userRole);\n\n// Grant manage permissions (Create, Update, Delete actions)\ntarget.grantManage(userRole);\n\n// Grant specific custom permissions\ntarget.grant(userRole, \"bedrock-agentcore:GetGatewayTarget\");\n\n\n// Grants permission to invoke this Gateway\ngateway.grantInvoke(userRole);\n```\n\n## Memory\n\nMemory is a critical component of intelligence. While Large Language Models (LLMs) have impressive capabilities, they lack persistent memory across conversations. Amazon Bedrock AgentCore Memory addresses this limitation by providing a managed service that enables AI agents to maintain context over time, remember important facts, and deliver consistent, personalized experiences.\n\nAgentCore Memory operates on two levels:\n\n- **Short-Term Memory**: Immediate conversation context and session-based information that provides continuity within a single interaction or closely related sessions.\n- **Long-Term Memory**: Persistent information extracted and stored across multiple conversations, including facts, preferences, and summaries that enable personalized experiences over time.\n\nWhen you interact with the memory via the `CreateEvent` API, you store interactions in Short-Term Memory (STM) instantly. These interactions can include everything from user messages, assistant responses, to tool actions.\n\nTo write to long-term memory, you need to configure extraction strategies which define how and where to store information from conversations for future use. These strategies are asynchronously processed from raw events after every few turns based on the strategy that was selected. You can't create long term memory records directly, as they are extracted asynchronously by AgentCore Memory.\n\n### Memory Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `memoryName` | `string` | No | The name of the memory. If not provided, a unique name will be auto-generated |\n| `expirationDuration` | `Duration` | No | Short-term memory expiration in days (between 7 and 365). Default: 90 days |\n| `description` | `string` | No | Optional description for the memory. Default: no description. |\n| `kmsKey` | `IKey` | No | Custom KMS key to use for encryption. Default: Your data is encrypted with a key that AWS owns and manages for you |\n| `memoryStrategies` | `MemoryStrategyBase[]` | No | Built-in extraction strategies to use for this memory. Default: No extraction strategies (short term memory only) |\n| `executionRole` | `iam.IRole` | No | The IAM role that provides permissions for the memory to access AWS services. Default: A new role will be created. |\n| `tags` | `{ [key: string]: string }` | No | Tags for memory. Default: no tags. |\n\n### Basic Memory Creation\n\nBelow you can find how to configure a simple short-term memory (STM) with no long-term memory extraction strategies.\nNote how you set `expirationDuration`, which defines the time the events will be stored in the short-term memory before they expire.\n\n```typescript fixture=default\n\n// Create a basic memory with default settings, no LTM strategies\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"A memory for storing user interactions for a period of 90 days\",\n expirationDuration: cdk.Duration.days(90),\n});\n```\n\nBasic Memory with Custom KMS Encryption\n\n```typescript fixture=default\n// Create a custom KMS key for encryption\nconst encryptionKey = new kms.Key(this, \"MemoryEncryptionKey\", {\n enableKeyRotation: true,\n description: \"KMS key for memory encryption\",\n});\n\n// Create memory with custom encryption\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_encrypted_memory\",\n description: \"Memory with custom KMS encryption\",\n expirationDuration: cdk.Duration.days(90),\n kmsKey: encryptionKey,\n});\n```\n\n### LTM Memory Extraction Stategies\n\nIf you need long-term memory for context recall across sessions, you can setup memory extraction strategies\nto extract the relevant memory from the raw events.\n\nAmazon Bedrock AgentCore Memory has different memory strategies for extracting and organizing information:\n\n- **Summarization**: to summarize interactions to preserve critical context and key insights.\n- **Semantic Memory**: to extract general factual knowledge, concepts and meanings from raw conversations using vector embeddings.\nThis enables similarity-based retrieval of relevant facts and context.\n- **User Preferences**: to extract user behavior patterns from raw conversations.\n\nYou can use built-in extraction strategies for quick setup, or create custom extraction strategies with specific models and prompt templates.\n\n### Memory with Built-in Strategies\n\nThe library provides four built-in LTM strategies. These are default strategies for organizing and extracting memory data,\neach optimized for specific use cases.\n\nFor example: An agent helps multiple users with cloud storage setup. From these conversations,\nsee how each strategy processes users expressing confusion about account connection:\n\n1. **Summarization Strategy** (`MemoryStrategy.usingBuiltInSummarization()`)\nThis strategy compresses conversations into concise overviews, preserving essential context and key insights for quick recall.\nExtracted memory example: Users confused by cloud setup during onboarding.\n\n - Extracts concise summaries to preserve critical context and key insights\n - Namespace: `/strategies/{memoryStrategyId}/actors/{actorId}/sessions/{sessionId}`\n\n2. **Semantic Memory Strategy** (`MemoryStrategy.usingBuiltInSemantic()`)\nDistills general facts, concepts, and underlying meanings from raw conversational data, presenting the information in a context-independent format.\nExtracted memory example: In-context learning = task-solving via examples, no training needed.\n\n - Extracts general factual knowledge, concepts and meanings from raw conversations\n - Namespace: `/strategies/{memoryStrategyId}/actors/{actorId}`\n\n3. **User Preference Strategy** (`MemoryStrategy.usingBuiltInUserPreference()`)\nCaptures individual preferences, interaction patterns, and personalized settings to enhance future experiences.\nExtracted memory example: User needs clear guidance on cloud storage account connection during onboarding.\n\n - Extracts user behavior patterns from raw conversations\n - Namespace: `/strategies/{memoryStrategyId}/actors/{actorId}`\n\n4. **Episodic Memory Strategy** (`MemoryStrategy.usingBuiltInEpisodic()`)\nCaptures meaningful slices of user and system interactions, preserve them into compact records after summarizing.\nExtracted memory example: User first asked about pricing on Monday, then requested feature comparison on Tuesday, finally made purchase decision on Wednesday.\n\n - Captures event sequences and temporal relationships\n - Namespace: `/strategy/{memoryStrategyId}/actor/{actorId}/session/{sessionId}`\n - Reflections: `/strategy/{memoryStrategyId}/actor/{actorId}`\n\n```typescript fixture=default\n// Create memory with built-in strategies\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"Memory with built-in strategies\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [\n agentcore.MemoryStrategy.usingBuiltInSummarization(),\n agentcore.MemoryStrategy.usingBuiltInSemantic(),\n agentcore.MemoryStrategy.usingBuiltInUserPreference(),\n agentcore.MemoryStrategy.usingBuiltInEpisodic(),\n ],\n});\n```\n\nThe name generated for each built in memory strategy is as follows:\n\n- For Summarization: `summary_builtin_cdk001`\n- For Semantic:`semantic_builtin_cdk001>`\n- For User Preferences: `preference_builtin_cdk001`\n- For Episodic : `episodic_builtin_cdkGen0001`\n\n### Memory with custom Strategies\n\nWith Long-Term Memory, organization is managed through Namespaces.\n\nAn `actor` refers to entity such as end users or agent/user combinations. For example, in a coding support chatbot,\nthe actor is usually the developer asking questions. Using the actor ID helps the system know which user the memory belongs to,\nkeeping each user's data separate and organized.\n\nA `session` is usually a single conversation or interaction period between the user and the AI agent.\nIt groups all related messages and events that happen during that conversation.\n\nA `namespace` is used to logically group and organize long-term memories. It ensures data stays neat, separate, and secure.\n\nWith AgentCore Memory, you need to add a namespace when you define a memory strategy. This namespace helps define where the long-term memory\nwill be logically grouped. Every time a new long-term memory is extracted using this memory strategy, it is saved under the namespace you set.\nThis means that all long-term memories are scoped to their specific namespace, keeping them organized and preventing any mix-ups with other\nusers or sessions. You should use a hierarchical format separated by forward slashes /. This helps keep memories organized clearly. As needed,\nyou can choose to use the below pre-defined variables within braces in the namespace based on your applications' organization needs:\n\n- `actorId` – Identifies who the long-term memory belongs to, such as a user\n- `memoryStrategyId` – Shows which memory strategy is being used. This strategy identifier is auto-generated when you create a memory using CreateMemory operation.\n- `sessionId` – Identifies which session or conversation the memory is from.\n\nFor example, if you define the following namespace as the input to your strategy in CreateMemory operation:\n\n```shell\n/strategy/{memoryStrategyId}/actor/{actorId}/session/{sessionId}\n```\n\nAfter memory creation, this namespace might look like:\n\n```shell\n/strategy/summarization-93483043//actor/actor-9830m2w3/session/session-9330sds8\n```\n\nYou can customise the namespace, i.e. where the memories are stored by using the following methods:\n\n1. **Summarization Strategy** (`MemoryStrategy.usingSummarization(props)`)\n1. **Semantic Memory Strategy** (`MemoryStrategy.usingSemantic(props)`)\n1. **User Preference Strategy** (`MemoryStrategy.usingUserPreference(props)`)\n1. **Episodic Memory Strategy** (`MemoryStrategy.usingEpisodic(props)`)\n\n```typescript fixture=default\n// Create memory with custom strategies\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"Memory with custom strategies\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [\n agentcore.MemoryStrategy.usingUserPreference({\n name: \"CustomerPreferences\",\n namespaces: [\"support/customer/{actorId}/preferences\"]\n }),\n agentcore.MemoryStrategy.usingSemantic({\n name: \"CustomerSupportSemantic\",\n namespaces: [\"support/customer/{actorId}/semantic\"]\n }),\n agentcore.MemoryStrategy.usingEpisodic({\n name: \"customerJourneyEpisodic\",\n namespaces: [\"/journey/customer/{actorId}/episodes\"],\n reflectionConfiguration: {\n namespaces: [\"/journey/customer/{actorId}/reflections\"]\n }\n }),\n ],\n});\n```\n\nCustom memory strategies let you tailor memory extraction and consolidation to your specific domain or use case.\nYou can override the prompts for extracting and consolidating semantic, summary, or user preferences.\nYou can also choose the model that you want to use for extraction and consolidation.\n\nThe custom prompts you create are appended to a non-editable system prompt.\n\nSince a custom strategy requires you to invoke certain FMs, you need a role with appropriate permissions. For that, you can:\n\n- Let the L2 construct create a minimum permission role for you when use L2 Bedrock Foundation Models.\n- Use a custom role with the overly permissive `AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy` managed policy.\n- Use a custom role with your own custom policies.\n\n#### Memory with Custom Execution Role\n\nKeep in mind that memories that **do not** use custom strategies do not require a service role.\nSo even if you provide it, it will be ignored as it will never be used.\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"MemoryExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n managedPolicies: [\n iam.ManagedPolicy.fromAwsManagedPolicyName(\n \"AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy\"\n ),\n ],\n});\n\n// Create memory with custom execution role\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"Memory with custom execution role\",\n expirationDuration: cdk.Duration.days(90),\n executionRole: executionRole,\n});\n```\n\nIn customConsolidation and customExtraction, the model property uses the [@aws-cdk/aws-bedrock-alph](https://www.npmjs.com/package/@aws-cdk/aws-bedrock-alpha) library which must be installed separately.\n\n```typescript fixture=default\n// Create a custom semantic memory strategy\nconst customSemanticStrategy = agentcore.MemoryStrategy.usingSemantic({\n name: \"customSemanticStrategy\",\n description: \"Custom semantic memory strategy\",\n namespaces: [\"/custom/strategies/{memoryStrategyId}/actors/{actorId}\"],\n customConsolidation: {\n model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,\n appendToPrompt: \"Custom consolidation prompt for semantic memory\",\n },\n customExtraction: {\n model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,\n appendToPrompt: \"Custom extraction prompt for semantic memory\",\n },\n});\n\n// Create memory with custom strategy\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my-custom-memory\",\n description: \"Memory with custom strategy\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [customSemanticStrategy],\n});\n```\n\n### Memory with self-managed Strategies\n\nA self-managed strategy in Amazon Bedrock AgentCore Memory gives you complete control over your memory extraction and consolidation pipelines.\nWith a self-managed strategy, you can build custom memory processing workflows while leveraging Amazon Bedrock AgentCore for storage and retrieval.\n\nFor additional information, you can refer to the [developer guide for self managed strategies](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory-self-managed-strategies.html).\n\nCreate the required AWS resources including:\n\n- an S3 bucket in your account where Amazon Bedrock AgentCore will deliver batched event payloads.\n- an SNS topic for job notifications. Use FIFO topics if processing order within sessions is important for your use case.\n\nThe construct will apply the correct permissions to the memory execution role to access these resources.\n\n```typescript fixture=default\n\nconst bucket = new s3.Bucket(this, 'memoryBucket', {\n bucketName: 'test-memory',\n removalPolicy: cdk.RemovalPolicy.DESTROY,\n autoDeleteObjects: true,\n});\n\nconst topic = new sns.Topic(this, 'topic');\n\n// Create a custom semantic memory strategy\nconst selfManagedStrategy = agentcore.MemoryStrategy.usingSelfManaged({\n name: \"selfManagedStrategy\",\n description: \"self managed memory strategy\",\n historicalContextWindowSize: 5,\n invocationConfiguration: {\n topic: topic,\n s3Location: {\n bucketName: bucket.bucketName,\n objectKey: 'memory/',\n }\n },\n triggerConditions: {\n messageBasedTrigger: 1,\n timeBasedTrigger: cdk.Duration.seconds(10),\n tokenBasedTrigger: 100\n }\n});\n\n// Create memory with custom strategy\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my-custom-memory\",\n description: \"Memory with custom strategy\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [selfManagedStrategy],\n});\n```\n\n### Memory Strategy Methods\n\nYou can add new memory strategies to the memory construct using the `addMemoryStrategy()` method, for instance:\n\n```typescript fixture=default\n// Create memory without initial strategies\nconst memory = new agentcore.Memory(this, \"test-memory\", {\n memoryName: \"test_memory_add_strategy\",\n description: \"A test memory for testing addMemoryStrategy method\",\n expirationDuration: cdk.Duration.days(90),\n});\n\n// Add strategies after instantiation\nmemory.addMemoryStrategy(agentcore.MemoryStrategy.usingBuiltInSummarization());\nmemory.addMemoryStrategy(agentcore.MemoryStrategy.usingBuiltInSemantic());\n```\n"
|
|
8569
|
+
"markdown": "# Amazon Bedrock AgentCore Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\n| **Language** | **Package** |\n| :--------------------------------------------------------------------------------------------- | --------------------------------------- |\n|  TypeScript | `@aws-cdk/aws-bedrock-agentcore-alpha` |\n\n[Amazon Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/) enables you to deploy and operate highly capable AI agents securely, at scale. It offers infrastructure purpose-built for dynamic agent workloads, powerful tools to enhance agents, and essential controls for real-world deployment. AgentCore services can be used together or independently and work with any framework including CrewAI, LangGraph, LlamaIndex, and Strands Agents, as well as any foundation model in or outside of Amazon Bedrock, giving you ultimate flexibility. AgentCore eliminates the undifferentiated heavy lifting of building specialized agent infrastructure, so you can accelerate agents to production.\n\nThis construct library facilitates the deployment of Bedrock AgentCore primitives, enabling you to create sophisticated AI applications that can interact with your systems and data sources.\n\n> **Note:** Users need to ensure their CDK deployment role has the `iam:CreateServiceLinkedRole` permission for AgentCore service-linked roles.\n\n## Table of contents\n\n- [Amazon Bedrock AgentCore Construct Library](#amazon-bedrock-agentcore-construct-library)\n - [Table of contents](#table-of-contents)\n - [AgentCore Runtime](#agentcore-runtime)\n - [Runtime Endpoints](#runtime-endpoints)\n - [AgentCore Runtime Properties](#agentcore-runtime-properties)\n - [Runtime Endpoint Properties](#runtime-endpoint-properties)\n - [Creating a Runtime](#creating-a-runtime)\n - [Option 1: Use an existing image in ECR](#option-1-use-an-existing-image-in-ecr)\n - [Option 2: Use a local asset](#option-2-use-a-local-asset)\n - [Option 3: Use direct code deployment](#option-3-use-direct-code-deployment)\n - [Option 4: Use an ECR container image URI](#option-4-use-an-ecr-container-image-uri)\n - [Granting Permissions to Invoke Bedrock Models or Inference Profiles](#granting-permissions-to-invoke-bedrock-models-or-inference-profiles)\n - [Runtime Versioning](#runtime-versioning)\n - [Managing Endpoints and Versions](#managing-endpoints-and-versions)\n - [Step 1: Initial Deployment](#step-1-initial-deployment)\n - [Step 2: Creating Custom Endpoints](#step-2-creating-custom-endpoints)\n - [Step 3: Runtime Update Deployment](#step-3-runtime-update-deployment)\n - [Step 4: Testing with Staging Endpoints](#step-4-testing-with-staging-endpoints)\n - [Step 5: Promoting to Production](#step-5-promoting-to-production)\n - [Creating Standalone Runtime Endpoints](#creating-standalone-runtime-endpoints)\n - [Example: Creating an endpoint for an existing runtime](#example-creating-an-endpoint-for-an-existing-runtime)\n - [Runtime Authentication Configuration](#runtime-authentication-configuration)\n - [IAM Authentication (Default)](#iam-authentication-default)\n - [Cognito Authentication](#cognito-authentication)\n - [JWT Authentication](#jwt-authentication)\n - [OAuth Authentication](#oauth-authentication)\n - [Using a Custom IAM Role](#using-a-custom-iam-role)\n - [Runtime Network Configuration](#runtime-network-configuration)\n - [Public Network Mode (Default)](#public-network-mode-default)\n - [VPC Network Mode](#vpc-network-mode)\n - [Managing Security Groups with VPC Configuration](#managing-security-groups-with-vpc-configuration)\n - [Runtime IAM Permissions](#runtime-iam-permissions)\n - [Other configuration](#other-configuration)\n - [Lifecycle configuration](#lifecycle-configuration)\n - [Request header configuration](#request-header-configuration)\n - [Browser](#browser)\n - [Browser Network modes](#browser-network-modes)\n - [Browser Properties](#browser-properties)\n - [Basic Browser Creation](#basic-browser-creation)\n - [Browser with Tags](#browser-with-tags)\n - [Browser with VPC](#browser-with-vpc)\n - [Browser with Recording Configuration](#browser-with-recording-configuration)\n - [Browser with Custom Execution Role](#browser-with-custom-execution-role)\n - [Browser with S3 Recording and Permissions](#browser-with-s3-recording-and-permissions)\n - [Browser with Browser signing](#browser-with-browser-signing)\n - [Browser IAM Permissions](#browser-iam-permissions)\n - [Code Interpreter](#code-interpreter)\n - [Code Interpreter Network Modes](#code-interpreter-network-modes)\n - [Code Interpreter Properties](#code-interpreter-properties)\n - [Basic Code Interpreter Creation](#basic-code-interpreter-creation)\n - [Code Interpreter with VPC](#code-interpreter-with-vpc)\n - [Code Interpreter with Sandbox Network Mode](#code-interpreter-with-sandbox-network-mode)\n - [Code Interpreter with Custom Execution Role](#code-interpreter-with-custom-execution-role)\n - [Code Interpreter IAM Permissions](#code-interpreter-iam-permissions)\n - [Code interpreter with tags](#code-interpreter-with-tags)\n - [Gateway](#gateway)\n - [Gateway Properties](#gateway-properties)\n - [Basic Gateway Creation](#basic-gateway-creation)\n - [Protocol configuration](#protocol-configuration)\n - [Inbound authorization](#inbound-authorization)\n - [Gateway with KMS Encryption](#gateway-with-kms-encryption)\n - [Gateway with Custom Execution Role](#gateway-with-custom-execution-role)\n - [Gateway IAM Permissions](#gateway-iam-permissions)\n - [Gateway Target](#gateway-target)\n - [Gateway Target Properties](#gateway-target-properties)\n - [Targets types](#targets-types)\n - [Understanding Tool Naming](#understanding-tool-naming)\n - [Tools schema For Lambda target](#tools-schema-for-lambda-target)\n - [Api schema For OpenAPI and Smithy target](#api-schema-for-openapi-and-smithy-target)\n - [Outbound auth](#outbound-auth)\n - [Basic Gateway Target Creation](#basic-gateway-target-creation)\n - [Using addTarget methods (Recommended)](#using-addtarget-methods-recommended)\n - [Using static factory methods](#using-static-factory-methods)\n - [Advanced Usage: Direct Configuration for gateway target](#advanced-usage-direct-configuration-for-gateway-target)\n - [Configuration Factory Methods](#configuration-factory-methods)\n - [Example: Lambda Target with Custom Configuration](#example-lambda-target-with-custom-configuration)\n - [Gateway Target IAM Permissions](#gateway-target-iam-permissions)\n - [Memory](#memory)\n - [Memory Properties](#memory-properties)\n - [Basic Memory Creation](#basic-memory-creation)\n - [LTM Memory Extraction Stategies](#ltm-memory-extraction-stategies)\n - [Memory with Built-in Strategies](#memory-with-built-in-strategies)\n - [Memory with custom Strategies](#memory-with-custom-strategies)\n - [Memory with Custom Execution Role](#memory-with-custom-execution-role)\n - [Memory with self-managed Strategies](#memory-with-self-managed-strategies)\n - [Memory Strategy Methods](#memory-strategy-methods)\n\n## AgentCore Runtime\n\nThe AgentCore Runtime construct enables you to deploy containerized agents on Amazon Bedrock AgentCore.\nThis L2 construct simplifies runtime creation just pass your ECR repository name\nand the construct handles all the configuration with sensible defaults.\n\n### Runtime Endpoints\n\nEndpoints provide a stable way to invoke specific versions of your agent runtime, enabling controlled deployments across different environments.\nWhen you create an agent runtime, Amazon Bedrock AgentCore automatically creates a \"DEFAULT\" endpoint which always points to the latest version\nof runtime.\n\nYou can create additional endpoints in two ways:\n\n1. **Using Runtime.addEndpoint()** - Convenient method when creating endpoints alongside the runtime.\n2. **Using RuntimeEndpoint** - Flexible approach for existing runtimes.\n\nFor example, you might keep a \"production\" endpoint on a stable version while testing newer versions\nthrough a \"staging\" endpoint. This separation allows you to test changes thoroughly before promoting them\nto production by simply updating the endpoint to point to the newer version.\n\n### AgentCore Runtime Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `runtimeName` | `string` | No | The name of the agent runtime. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long. If not provided, a unique name will be auto-generated |\n| `agentRuntimeArtifact` | `AgentRuntimeArtifact` | Yes | The artifact configuration for the agent runtime containing the container configuration with ECR URI |\n| `executionRole` | `iam.IRole` | No | The IAM role that provides permissions for the agent runtime. If not provided, a role will be created automatically |\n| `networkConfiguration` | `NetworkConfiguration` | No | Network configuration for the agent runtime. Defaults to `RuntimeNetworkConfiguration.usingPublicNetwork()` |\n| `description` | `string` | No | Optional description for the agent runtime |\n| `protocolConfiguration` | `ProtocolType` | No | Protocol configuration for the agent runtime. Defaults to `ProtocolType.HTTP` |\n| `authorizerConfiguration` | `RuntimeAuthorizerConfiguration` | No | Authorizer configuration for the agent runtime. Use `RuntimeAuthorizerConfiguration` static methods to create configurations for IAM, Cognito, JWT, or OAuth authentication |\n| `environmentVariables` | `{ [key: string]: string }` | No | Environment variables for the agent runtime. Maximum 50 environment variables |\n| `tags` | `{ [key: string]: string }` | No | Tags for the agent runtime. A list of key:value pairs of tags to apply to this Runtime resource |\n| `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 |\n| `requestHeaderConfiguration` | RequestHeaderConfiguration | No | Configuration for HTTP request headers that will be passed through to the runtime. Defaults to no configuration |\n\n### Runtime Endpoint Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `endpointName` | `string` | No | The name of the runtime endpoint. Valid characters are a-z, A-Z, 0-9, _ (underscore). Must start with a letter and can be up to 48 characters long. If not provided, a unique name will be auto-generated |\n| `agentRuntimeId` | `string` | Yes | The Agent Runtime ID for this endpoint |\n| `agentRuntimeVersion` | `string` | Yes | The Agent Runtime version for this endpoint. Must be between 1 and 5 characters long.|\n| `description` | `string` | No | Optional description for the runtime endpoint |\n| `tags` | `{ [key: string]: string }` | No | Tags for the runtime endpoint |\n\n### Creating a Runtime\n\n#### Option 1: Use an existing image in ECR\n\nReference an image available within ECR.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\n// The runtime by default create ECR permission only for the repository available in the account the stack is being deployed\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create runtime using the built image\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact\n});\n```\n\n#### Option 2: Use a local asset\n\nReference a local directory containing a Dockerfile.\nImages are built from a local Docker context directory (with a Dockerfile), uploaded to Amazon Elastic Container Registry (ECR)\nby the CDK toolkit,and can be naturally referenced in your CDK app.\n\n```typescript fixture=default\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromAsset(\n path.join(__dirname, \"path to agent dockerfile directory\")\n);\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\n#### Option 3: Use direct code deployment\n\nWith 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.\n\nHowever, 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.\n\nWith 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.\n\nFor more information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-code-deploy.html).\n\n```typescript fixture=default\n// S3 bucket containing the agent core\nconst codeBucket = new s3.Bucket(this, \"AgentCode\", {\n bucketName: \"my-code-bucket\",\n removalPolicy: RemovalPolicy.DESTROY, // For demo purposes\n});\n\n// the bucket above needs to contain the agent code\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromS3(\n {\n bucketName: codeBucket.bucketName,\n objectKey: 'deployment_package.zip',\n },\n agentcore.AgentCoreRuntime.PYTHON_3_12,\n ['opentelemetry-instrument', 'main.py']\n);\n\nconst runtimeInstance = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\nAlternatively, you can use local code assets that will be automatically packaged and uploaded to a CDK-managed S3 bucket:\n\n```typescript fixture=default\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromCodeAsset({\n path: path.join(__dirname, 'path/to/agent/code'),\n runtime: agentcore.AgentCoreRuntime.PYTHON_3_12,\n entrypoint: ['opentelemetry-instrument', 'main.py'],\n});\n\nconst runtimeInstance = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\n#### Option 4: Use an ECR container image URI\n\nReference an ECR container image directly by its URI. This is useful when you have a pre-existing ECR image URI from CloudFormation parameters or cross-stack references. No IAM permissions are automatically granted - you must ensure the runtime has ECR pull permissions.\n\n```typescript fixture=default\n// Direct URI reference\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromImageUri(\n \"123456789012.dkr.ecr.us-east-1.amazonaws.com/my-agent:v1.0.0\"\n);\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\nYou can also use CloudFormation parameters or references:\n\n```typescript fixture=default\n// Using a CloudFormation parameter\nconst imageUriParam = new cdk.CfnParameter(this, \"ImageUri\", {\n type: \"String\",\n description: \"Container image URI for the agent runtime\",\n});\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromImageUri(\n imageUriParam.valueAsString\n);\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n```\n\n### Granting Permissions to Invoke Bedrock Models or Inference Profiles\n\nTo grant the runtime permissions to invoke Bedrock models or inference profiles:\n\n```typescript fixture=default\n// Note: This example uses @aws-cdk/aws-bedrock-alpha which must be installed separately\ndeclare const runtime: agentcore.Runtime;\n\n// Define the Bedrock Foundation Model\nconst model = bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_7_SONNET_V1_0;\n\n// Grant the runtime permissions to invoke the model\nmodel.grantInvoke(runtime);\n\n// Create a cross-region inference profile for Claude 3.7 Sonnet\nconst inferenceProfile = bedrock.CrossRegionInferenceProfile.fromConfig({\n geoRegion: bedrock.CrossRegionInferenceProfileRegion.US,\n model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_7_SONNET_V1_0\n});\n\n// Grant the runtime permissions to invoke the inference profile\ninferenceProfile.grantInvoke(runtime);\n```\n\n### Runtime Versioning\n\nAmazon Bedrock AgentCore automatically manages runtime versioning to ensure safe deployments and rollback capabilities.\nWhen you create an agent runtime, AgentCore automatically creates version 1 (V1). Each subsequent update to the\nruntime configuration (such as updating the container image, modifying network settings, or changing protocol configurations)\ncreates a new immutable version. These versions contain complete, self-contained configurations that can be referenced by endpoints,\nallowing you to maintain different versions for different environments or gradually roll out updates.\n\n#### Managing Endpoints and Versions\n\nAmazon Bedrock AgentCore automatically manages runtime versioning to provide safe deployments and rollback capabilities. You can follow\nthe steps below to understand how to use versioning with runtime for controlled deployments across different environments.\n\n##### Step 1: Initial Deployment\n\nWhen you first create an agent runtime, AgentCore automatically creates Version 1 of your runtime. At this point, a DEFAULT endpoint is\nautomatically created that points to Version 1. This DEFAULT endpoint serves as the main access point for your runtime.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\"),\n});\n```\n\n##### Step 2: Creating Custom Endpoints\n\nAfter the initial deployment, you can create additional endpoints for different environments. For example, you might create a \"production\"\nendpoint that explicitly points to Version 1. This allows you to maintain stable access points for specific environments while keeping the\nflexibility to test newer versions elsewhere.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\"),\n});\n\nconst prodEndpoint = runtime.addEndpoint(\"production\", {\n version: \"1\",\n description: \"Stable production endpoint - pinned to v1\"\n});\n```\n\n##### Step 3: Runtime Update Deployment\n\nWhen you update the runtime configuration (such as updating the container image, modifying network settings, or changing protocol\nconfigurations), AgentCore automatically creates a new version (Version 2). Upon this update:\n\n- Version 2 is created automatically with the new configuration\n- The DEFAULT endpoint automatically updates to point to Version 2\n- Any explicitly pinned endpoints (like the production endpoint) remain on their specified versions\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifactNew = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v2.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifactNew,\n});\n```\n\n##### Step 4: Testing with Staging Endpoints\n\nOnce Version 2 exists, you can create a staging endpoint that points to the new version. This staging endpoint allows you to test the\nnew version in a controlled environment before promoting it to production. This separation ensures that production traffic continues\nto use the stable version while you validate the new version.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifactNew = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v2.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifactNew,\n});\n\nconst stagingEndpoint = runtime.addEndpoint(\"staging\", {\n version: \"2\",\n description: \"Staging environment for testing new version\"\n});\n```\n\n##### Step 5: Promoting to Production\n\nAfter thoroughly testing the new version through the staging endpoint, you can update the production endpoint to point to Version 2.\nThis controlled promotion process ensures that you can validate changes before they affect production traffic.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifactNew = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v2.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifactNew,\n});\n\nconst prodEndpoint = runtime.addEndpoint(\"production\", {\n version: \"2\", // New version added here\n description: \"Stable production endpoint\"\n});\n```\n\n### Creating Standalone Runtime Endpoints\n\nRuntimeEndpoint can also be created as a standalone resource.\n\n#### Example: Creating an endpoint for an existing runtime\n\n```typescript fixture=default\n// Reference an existing runtime by its ID\nconst existingRuntimeId = \"abc123-runtime-id\"; // The ID of an existing runtime\n\n// Create a standalone endpoint\nconst endpoint = new agentcore.RuntimeEndpoint(this, \"MyEndpoint\", {\n endpointName: \"production\",\n agentRuntimeId: existingRuntimeId,\n agentRuntimeVersion: \"1\", // Specify which version to use\n description: \"Production endpoint for existing runtime\"\n});\n```\n\n### Runtime Authentication Configuration\n\nThe AgentCore Runtime supports multiple authentication modes to secure access to your agent endpoints. Authentication is configured during runtime creation using the `RuntimeAuthorizerConfiguration` class's static factory methods.\n\n#### IAM Authentication (Default)\n\nIAM authentication is the default mode, when no authorizerConfiguration is set then the underlying service use IAM.\n\n#### Cognito Authentication\n\nTo configure AWS Cognito User Pool authentication:\n\n```typescript fixture=default\ndeclare const userPool: cognito.UserPool;\ndeclare const userPoolClient: cognito.UserPoolClient;\ndeclare const anotherUserPoolClient: cognito.UserPoolClient;\n\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Optional: Create custom claims for additional validation\nconst customClaims = [\n agentcore.RuntimeCustomClaim.withStringValue('department', 'engineering'),\n agentcore.RuntimeCustomClaim.withStringArrayValue('roles', ['admin'], agentcore.CustomClaimOperator.CONTAINS),\n agentcore.RuntimeCustomClaim.withStringArrayValue('permissions', ['read', 'write'], agentcore.CustomClaimOperator.CONTAINS_ANY),\n];\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingCognito(\n userPool, // User Pool (required)\n [userPoolClient, anotherUserPoolClient], // User Pool Clients\n [\"audience1\"], // Allowed Audiences (optional)\n [\"read\", \"write\"], // Allowed Scopes (optional)\n customClaims, // Custom claims (optional) - see Custom Claims Validation section\n ),\n});\n```\n\nYou can configure:\n\n- User Pool: The Cognito User Pool that issues JWT tokens\n- User Pool Clients: One or more Cognito User Pool App Clients that are allowed to access the runtime\n- Allowed audiences: Used to validate that the audiences specified in the Cognito token match or are a subset of the audiences specified in the AgentCore Runtime\n- Allowed scopes: Allow access only if the token contains at least one of the required scopes configured here\n- Custom claims: A set of rules to match specific claims in the incoming token against predefined values for validating JWT tokens\n\n#### JWT Authentication\n\nTo configure custom JWT authentication with your own OpenID Connect (OIDC) provider:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingJWT(\n \"https://example.com/.well-known/openid-configuration\", // Discovery URL (required)\n [\"client1\", \"client2\"], // Allowed Client IDs (optional)\n [\"audience1\"], // Allowed Audiences (optional)\n [\"read\", \"write\"], // Allowed Scopes (optional)\n // Custom claims (optional) - see Custom Claims Validation section below\n ),\n});\n```\n\nYou can configure:\n\n- Discovery URL: Enter the Discovery URL from your identity provider (e.g. Okta, Cognito, etc.), typically found in that provider's documentation. This allows your Agent or Tool to fetch login, downstream resource token, and verification settings.\n- Allowed audiences: This is used to validate that the audiences specified for the OAuth token matches or are a subset of the audiences specified in the AgentCore Runtime.\n- Allowed clients: This is used to validate that the public identifier of the client, as specified in the authorization token, is allowed to access the AgentCore Runtime.\n- Allowed scopes: Allow access only if the token contains at least one of the required scopes configured here.\n- Custom claims: A set of rules to match specific claims in the incoming token against predefined values for validating JWT tokens.\n\n**Note**: The discovery URL must end with `/.well-known/openid-configuration`.\n\n##### Custom Claims Validation\n\nCustom claims allow you to validate additional fields in JWT tokens beyond the standard audience, client, and scope validations. You can create custom claims using the `RuntimeCustomClaim` class:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// String claim - validates that the claim exactly equals the specified value\n// Uses EQUALS operator automatically\nconst departmentClaim = agentcore.RuntimeCustomClaim.withStringValue('department', 'engineering');\n\n// String array claim with CONTAINS operator (default)\n// Validates that the claim array contains a specific string value\n// IMPORTANT: CONTAINS requires exactly one value in the array parameter\nconst rolesClaim = agentcore.RuntimeCustomClaim.withStringArrayValue('roles', ['admin']);\n\n// String array claim with CONTAINS_ANY operator\n// Validates that the claim array contains at least one of the specified values\n// Use this when you want to check for multiple possible values\nconst permissionsClaim = agentcore.RuntimeCustomClaim.withStringArrayValue(\n 'permissions',\n ['read', 'write'],\n agentcore.CustomClaimOperator.CONTAINS_ANY\n);\n\n// Use custom claims in authorizer configuration\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingJWT(\n \"https://example.com/.well-known/openid-configuration\",\n [\"client1\", \"client2\"],\n [\"audience1\"],\n [\"read\", \"write\"],\n [departmentClaim, rolesClaim, permissionsClaim] // Custom claims\n ),\n});\n```\n\n**Custom Claim Rules**:\n\n- **String claims**: Must use the `EQUALS` operator (automatically set). The claim value must exactly match the specified string.\n- **String array claims**: Can use `CONTAINS` (default) or `CONTAINS_ANY` operators:\n - **`CONTAINS`**: Checks if the claim array contains a specific string value. **Requires exactly one value** in the array parameter. For example, `['admin']` will check if the token's claim array contains the string `'admin'`.\n - **`CONTAINS_ANY`**: Checks if the claim array contains at least one of the provided string values. Use this when you want to validate against multiple possible values. For example, `['read', 'write']` will check if the token's claim array contains either `'read'` or `'write'`.\n\n**Example Use Cases**:\n\n- Use `CONTAINS` when you need to verify a user has a specific role: `RuntimeCustomClaim.withStringArrayValue('roles', ['admin'])`\n- Use `CONTAINS_ANY` when you need to verify a user has any of several permissions: `RuntimeCustomClaim.withStringArrayValue('permissions', ['read', 'write'], CustomClaimOperator.CONTAINS_ANY)`\n\n#### OAuth Authentication\n\nTo configure OAuth 2.0 authentication:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingOAuth(\n \"https://github.com/.well-known/openid-configuration\", // Discovery URL (required)\n \"oauth_client_123\", // OAuth Client ID (required)\n [\"audience1\"], // Allowed Audiences (optional)\n [\"openid\", \"profile\"], // Allowed Scopes (optional)\n // Custom claims (optional) - see Custom Claims Validation section\n ),\n});\n```\n\n#### Using a Custom IAM Role\n\nInstead of using the auto-created execution role, you can provide your own IAM role with specific permissions:\nThe auto-created role includes all necessary baseline permissions for ECR access, CloudWatch logging, and X-Ray tracing. When providing a custom role, ensure these permissions are included.\n\n### Runtime Network Configuration\n\nThe AgentCore Runtime supports two network modes for deployment:\n\n#### Public Network Mode (Default)\n\nBy default, runtimes are deployed in PUBLIC network mode, which provides internet access suitable for less sensitive or open-use scenarios:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Explicitly using public network (this is the default)\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n networkConfiguration: agentcore.RuntimeNetworkConfiguration.usingPublicNetwork(),\n});\n```\n\n#### VPC Network Mode\n\nFor enhanced security and network isolation, you can deploy your runtime within a VPC:\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create or use an existing VPC\nconst vpc = new ec2.Vpc(this, 'MyVpc', {\n maxAzs: 2,\n});\n\n// Configure runtime with VPC\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n networkConfiguration: agentcore.RuntimeNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },\n // Optionally specify security groups, or one will be created automatically\n // securityGroups: [mySecurityGroup],\n }),\n});\n\n```\n\n#### Managing Security Groups with VPC Configuration\n\nWhen using VPC mode, the Runtime implements `ec2.IConnectable`, allowing you to manage network access using the `connections` property:\n\n```typescript fixture=default\nconst vpc = new ec2.Vpc(this, 'MyVpc', {\n maxAzs: 2,\n});\n\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create runtime with VPC configuration\nconst runtime = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n networkConfiguration: agentcore.RuntimeNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },\n }),\n});\n\n// Now you can manage network access using the connections property\n// Allow inbound HTTPS traffic from a specific security group\nconst webServerSecurityGroup = new ec2.SecurityGroup(this, 'WebServerSG', { vpc });\nruntime.connections.allowFrom(webServerSecurityGroup, ec2.Port.tcp(443), 'Allow HTTPS from web servers');\n\n// Allow outbound connections to a database\nconst databaseSecurityGroup = new ec2.SecurityGroup(this, 'DatabaseSG', { vpc });\nruntime.connections.allowTo(databaseSecurityGroup, ec2.Port.tcp(5432), 'Allow PostgreSQL connection');\n\n// Allow outbound HTTPS to anywhere (for external API calls)\nruntime.connections.allowToAnyIpv4(ec2.Port.tcp(443), 'Allow HTTPS outbound');\n```\n\n### Runtime IAM Permissions\n\nThe Runtime construct provides convenient methods for granting IAM permissions to principals that need to invoke the runtime or manage its execution role.\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\n// Create a runtime\nconst runtime = new agentcore.Runtime(this, \"MyRuntime\", {\n runtimeName: \"my_runtime\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});\n\n// Create a Lambda function that needs to invoke the runtime\nconst invokerFunction = new lambda.Function(this, \"InvokerFunction\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\nimport boto3\ndef handler(event, context):\n client = boto3.client('bedrock-agentcore')\n # Invoke the runtime...\n `),\n});\n\n// Grant permission to invoke the runtime directly\nruntime.grantInvokeRuntime(invokerFunction);\n\n// Grant permission to invoke the runtime on behalf of a user\n// (requires X-Amzn-Bedrock-AgentCore-Runtime-User-Id header)\nruntime.grantInvokeRuntimeForUser(invokerFunction);\n\n// Grant both invoke permissions (most common use case)\nruntime.grantInvoke(invokerFunction);\n\n// Grant specific custom permissions to the runtime's execution role\nruntime.grant(['bedrock:InvokeModel'], ['arn:aws:bedrock:*:*:*']);\n\n// Add a policy statement to the runtime's execution role\nruntime.addToRolePolicy(new iam.PolicyStatement({\n actions: ['s3:GetObject'],\n resources: ['arn:aws:s3:::my-bucket/*'],\n}));\n```\n\n### Other configuration\n\n#### Lifecycle configuration\n\nThe 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.\n\nYou can configure:\n\n- 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)\n- 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)\n\nFor additional information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-lifecycle-settings.html).\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nnew agentcore.Runtime(this, 'test-runtime', {\n runtimeName: 'test_runtime',\n agentRuntimeArtifact: agentRuntimeArtifact,\n lifecycleConfiguration: {\n idleRuntimeSessionTimeout: Duration.minutes(10),\n maxLifetime: Duration.hours(4),\n },\n});\n```\n\n#### Request header configuration\n\nCustom 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.\n\nFor additional information, please refer to the [documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-header-allowlist.html).\n\n```typescript fixture=default\nconst repository = new ecr.Repository(this, \"TestRepository\", {\n repositoryName: \"test-agent-runtime\",\n});\n\nconst agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, \"v1.0.0\");\n\nnew agentcore.Runtime(this, 'test-runtime', {\n runtimeName: 'test_runtime',\n agentRuntimeArtifact: agentRuntimeArtifact,\n requestHeaderConfiguration: {\n allowlistedHeaders: ['X-Amzn-Bedrock-AgentCore-Runtime-Custom-H1'],\n },\n});\n```\n\n## Browser\n\nThe 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.\n\nAdditional information about the browser tool can be found in the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/browser-tool.html)\n\n### Browser Network modes\n\nThe Browser construct supports the following network modes:\n\n1. **Public Network Mode** (`BrowserNetworkMode.usingPublicNetwork()`) - Default\n\n - Allows internet access for web browsing and external API calls\n - Suitable for scenarios where agents need to interact with publicly available websites\n - Enables full web browsing capabilities\n - VPC mode is not supported with this option\n\n2. **VPC (Virtual Private Cloud)** (`BrowserNetworkMode.usingVpc()`)\n\n - Select whether to run the browser in a virtual private cloud (VPC).\n - By configuring VPC connectivity, you enable secure access to private resources such as databases, internal APIs, and services within your VPC.\n\n While the VPC itself is mandatory, these are optional:\n - Subnets - if not provided, CDK will select appropriate subnets from the VPC\n - Security Groups - if not provided, CDK will create a default security group\n - Specific subnet selection criteria - you can let CDK choose automatically\n\nFor more information on VPC connectivity for Amazon Bedrock AgentCore Browser, please refer to the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-vpc.html).\n\n### Browser Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `browserCustomName` | `string` | No | The name of the browser. Must start with a letter and can be up to 48 characters long. Pattern: `[a-zA-Z][a-zA-Z0-9_]{0,47}`. If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the browser. Can have up to 200 characters |\n| `networkConfiguration` | `BrowserNetworkConfiguration` | No | Network configuration for browser. Defaults to PUBLIC network mode |\n| `recordingConfig` | `RecordingConfig` | No | Recording configuration for browser. Defaults to no recording |\n| `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 |\n| `tags` | `{ [key: string]: string }` | No | Tags to apply to the browser resource |\n| `browserSigning` | BrowserSigning | No | Browser signing configuration. Defaults to DISABLED |\n\n### Basic Browser Creation\n\n```typescript fixture=default\n// Create a basic browser with public network access\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"A browser for web automation\",\n});\n```\n\n### Browser with Tags\n\n```typescript fixture=default\n// Create a browser with custom tags\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"A browser for web automation with tags\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n tags: {\n Environment: \"Production\",\n Team: \"AI/ML\",\n Project: \"AgentCore\",\n },\n});\n```\n\n### Browser with VPC\n\n```typescript fixture=default\nconst browser = new agentcore.BrowserCustom(this, 'BrowserVpcWithRecording', {\n browserCustomName: 'browser_recording',\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: new ec2.Vpc(this, 'VPC', { restrictDefaultSecurityGroup: false }),\n }),\n});\n```\n\nBrowser exposes a [connections](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) property. This property returns a connections object, which simplifies the process of defining and managing ingress and egress rules for security groups in your AWS CDK applications. Instead of directly manipulating security group rules, you interact with the Connections object of a construct, which then translates your connectivity requirements into the appropriate security group rules. For instance:\n\n```typescript fixture=default\nconst vpc = new ec2.Vpc(this, 'testVPC');\n\nconst browser = new agentcore.BrowserCustom(this, 'test-browser', {\n browserCustomName: 'test_browser',\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n }),\n});\n\nbrowser.connections.addSecurityGroup(new ec2.SecurityGroup(this, 'AdditionalGroup', { vpc }));\n```\n\nSo security groups can be added after the browser construct creation. You can use methods like allowFrom() and allowTo() to grant ingress access to/egress access from a specified peer over a given portRange. The Connections object automatically adds the necessary ingress or egress rules to the security group(s) associated with the calling construct.\n\n### Browser with Recording Configuration\n\n```typescript fixture=default\n// Create an S3 bucket for recordings\nconst recordingBucket = new s3.Bucket(this, \"RecordingBucket\", {\n bucketName: \"my-browser-recordings\",\n removalPolicy: RemovalPolicy.DESTROY, // For demo purposes\n});\n\n// Create browser with recording enabled\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser with recording enabled\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n recordingConfig: {\n enabled: true,\n s3Location: {\n bucketName: recordingBucket.bucketName,\n objectKey: \"browser-recordings/\",\n },\n },\n});\n```\n\n### Browser with Custom Execution Role\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"BrowserExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n managedPolicies: [\n iam.ManagedPolicy.fromAwsManagedPolicyName(\"AmazonBedrockAgentCoreBrowserExecutionRolePolicy\"),\n ],\n});\n\n// Create browser with custom execution role\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser with custom execution role\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n executionRole: executionRole,\n});\n```\n\n### Browser with S3 Recording and Permissions\n\n```typescript fixture=default\n// Create an S3 bucket for recordings\nconst recordingBucket = new s3.Bucket(this, \"RecordingBucket\", {\n bucketName: \"my-browser-recordings\",\n removalPolicy: RemovalPolicy.DESTROY, // For demo purposes\n});\n\n// Create browser with recording enabled\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser with recording enabled\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n recordingConfig: {\n enabled: true,\n s3Location: {\n bucketName: recordingBucket.bucketName,\n objectKey: \"browser-recordings/\",\n },\n },\n});\n\n// The browser construct automatically grants S3 permissions to the execution role\n// when recording is enabled, so no additional IAM configuration is needed\n```\n\n### Browser with Browser signing\n\nAI 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.\n\nAmazon 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.\n\nTo enable the browser to sign requests using the Web Bot Auth protocol, create a browser tool with the browserSigning configuration:\n\n```typescript fixture=default\nconst browser = new agentcore.BrowserCustom(this, 'test-browser', {\n browserCustomName: 'test_browser',\n browserSigning: agentcore.BrowserSigning.ENABLED\n});\n```\n\n### Browser IAM Permissions\n\nThe Browser construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a browser\nconst browser = new agentcore.BrowserCustom(this, \"MyBrowser\", {\n browserCustomName: \"my_browser\",\n description: \"Browser for web automation\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingPublicNetwork(),\n});\n\n// Create a role that needs access to the browser\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\nbrowser.grantRead(userRole);\n\n// Grant use permissions (Start, Update, Stop actions)\nbrowser.grantUse(userRole);\n\n// Grant specific custom permissions\nbrowser.grant(userRole, \"bedrock-agentcore:GetBrowserSession\");\n```\n\n## Code Interpreter\n\nThe Amazon Bedrock AgentCore Code Interpreter enables AI agents to write and execute code securely in sandbox environments, enhancing their accuracy and expanding their ability to solve complex end-to-end tasks. This is critical in Agentic AI applications where the agents may execute arbitrary code that can lead to data compromise or security risks. The AgentCore Code Interpreter tool provides secure code execution, which helps you avoid running into these issues.\n\nFor more information about code interpreter, please refer to the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/code-interpreter-tool.html)\n\n### Code Interpreter Network Modes\n\nThe Code Interpreter construct supports the following network modes:\n\n1. **Public Network Mode** (`CodeInterpreterNetworkMode.usingPublicNetwork()`) - Default\n\n - Allows internet access for package installation and external API calls\n - Suitable for development and testing environments\n - Enables downloading Python packages from PyPI\n\n2. **Sandbox Network Mode** (`CodeInterpreterNetworkMode.usingSandboxNetwork()`)\n - Isolated network environment with no internet access\n - Suitable for production environments with strict security requirements\n - Only allows access to pre-installed packages and local resources\n\n3. **VPC (Virtual Private Cloud)** (`CodeInterpreterNetworkMode.usingVpc()`)\n - Select whether to run the browser in a virtual private cloud (VPC).\n - By configuring VPC connectivity, you enable secure access to private resources such as databases, internal APIs, and services within your VPC.\n\n While the VPC itself is mandatory, these are optional:\n - Subnets - if not provided, CDK will select appropriate subnets from the VPC\n - Security Groups - if not provided, CDK will create a default security group\n - Specific subnet selection criteria - you can let CDK choose automatically\n\nFor more information on VPC connectivity for Amazon Bedrock AgentCore Browser, please refer to the [official documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-vpc.html).\n\n### Code Interpreter Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `codeInterpreterCustomName` | `string` | No | The name of the code interpreter. Must start with a letter and can be up to 48 characters long. Pattern: `[a-zA-Z][a-zA-Z0-9_]{0,47}`. If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the code interpreter. Can have up to 200 characters |\n| `executionRole` | `iam.IRole` | No | The IAM role that provides permissions for the code interpreter to access AWS services. A new role will be created if not provided |\n| `networkConfiguration` | `CodeInterpreterNetworkConfiguration` | No | Network configuration for code interpreter. Defaults to PUBLIC network mode |\n| `tags` | `{ [key: string]: string }` | No | Tags to apply to the code interpreter resource |\n\n### Basic Code Interpreter Creation\n\n```typescript fixture=default\n// Create a basic code interpreter with public network access\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_code_interpreter\",\n description: \"A code interpreter for Python execution\",\n});\n```\n\n### Code Interpreter with VPC\n\n```typescript fixture=default\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: new ec2.Vpc(this, 'VPC', { restrictDefaultSecurityGroup: false }),\n }),\n});\n```\n\nCode Interpreter exposes a [connections](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) property. This property returns a connections object, which simplifies the process of defining and managing ingress and egress rules for security groups in your AWS CDK applications. Instead of directly manipulating security group rules, you interact with the Connections object of a construct, which then translates your connectivity requirements into the appropriate security group rules. For instance:\n\n```typescript fixture=default\nconst vpc = new ec2.Vpc(this, 'testVPC');\n\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.BrowserNetworkConfiguration.usingVpc(this, {\n vpc: vpc,\n }),\n});\n\ncodeInterpreter.connections.addSecurityGroup(new ec2.SecurityGroup(this, 'AdditionalGroup', { vpc }));\n```\n\nSo security groups can be added after the browser construct creation. You can use methods like allowFrom() and allowTo() to grant ingress access to/egress access from a specified peer over a given portRange. The Connections object automatically adds the necessary ingress or egress rules to the security group(s) associated with the calling construct.\n\n### Code Interpreter with Sandbox Network Mode\n\n```typescript fixture=default\n// Create code interpreter with sandbox network mode (isolated)\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingSandboxNetwork(),\n});\n```\n\n### Code Interpreter with Custom Execution Role\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"CodeInterpreterExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n});\n\n// Create code interpreter with custom execution role\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_code_interpreter\",\n description: \"Code interpreter with custom execution role\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingPublicNetwork(),\n executionRole: executionRole,\n});\n```\n\n### Code Interpreter IAM Permissions\n\nThe Code Interpreter construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a code interpreter\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_code_interpreter\",\n description: \"Code interpreter for Python execution\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingPublicNetwork(),\n});\n\n// Create a role that needs access to the code interpreter\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\ncodeInterpreter.grantRead(userRole);\n\n// Grant use permissions (Start, Invoke, Stop actions)\ncodeInterpreter.grantUse(userRole);\n\n// Grant specific custom permissions\ncodeInterpreter.grant(userRole, \"bedrock-agentcore:GetCodeInterpreterSession\");\n```\n\n### Code interpreter with tags\n\n```typescript fixture=default\n// Create code interpreter with sandbox network mode (isolated)\nconst codeInterpreter = new agentcore.CodeInterpreterCustom(this, \"MyCodeInterpreter\", {\n codeInterpreterCustomName: \"my_sandbox_interpreter\",\n description: \"Code interpreter with isolated network access\",\n networkConfiguration: agentcore.CodeInterpreterNetworkConfiguration.usingPublicNetwork(),\n tags: {\n Environment: \"Production\",\n Team: \"AI/ML\",\n Project: \"AgentCore\",\n },\n});\n```\n\n## Gateway\n\nThe Gateway construct provides a way to create Amazon Bedrock Agent Core Gateways, which serve as integration points between agents and external services.\n\n### Gateway Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `gatewayName` | `string` | No | The name of the gateway. Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen). Maximum 100 characters. If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the gateway. Maximum 200 characters |\n| `protocolConfiguration` | `IGatewayProtocolConfig` | No | The protocol configuration for the gateway. Defaults to MCP protocol |\n| `authorizerConfiguration` | `IGatewayAuthorizerConfig` | No | The authorizer configuration for the gateway. Defaults to Cognito |\n| `exceptionLevel` | `GatewayExceptionLevel` | No | The verbosity of exception messages. Use DEBUG mode to see granular exception messages |\n| `kmsKey` | `kms.IKey` | No | The AWS KMS key used to encrypt data associated with the gateway |\n| `role` | `iam.IRole` | No | The IAM role that provides permissions for the gateway to access AWS services. A new role will be created if not provided |\n| `tags` | `{ [key: string]: string }` | No | Tags for the gateway. A list of key:value pairs of tags to apply to this Gateway resource |\n\n### Basic Gateway Creation\n\nThe protocol configuration defaults to MCP and the inbound auth configuration uses Cognito (it is automatically created on your behalf).\n\n```typescript fixture=default\n// Create a basic gateway with default MCP protocol and Cognito authorizer\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n```\n\n### Protocol configuration\n\nCurrently MCP is the only protocol available. To configure it, use the `protocol` property with `McpProtocolConfiguration`:\n\n- Instructions: Guidance for how to use the gateway with your tools\n- Semantic search: Smart tool discovery that finds the right tools without typical limits. It improves accuracy by finding relevant tools based on context\n- Supported versions: Which MCP protocol versions the gateway can use\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n});\n```\n\n### Inbound authorization\n\nBefore you create your gateway, you must set up inbound authorization. Inbound authorization validates users who attempt to access targets through\nyour AgentCore gateway. By default, if not provided, the construct will create and configure Cognito as the default identity provider\n(inbound Auth setup). AgentCore supports the following types of inbound authorization:\n\n**JSON Web Token (JWT)** – A secure and compact token used for authorization. After creating the JWT, you specify it as the authorization\nconfiguration when you create the gateway. You can create a JWT with any of the identity providers at Provider setup and configuration.\n\nYou can configure a custom authorization provider using the `authorizerConfiguration` property with `GatewayAuthorizer.usingCustomJwt()`.\nYou need to specify an OAuth discovery server and client IDs/audiences when you create the gateway. You can specify the following:\n\n- Discovery Url — String that must match the pattern ^.+/\\.well-known/openid-configuration$ for OpenID Connect discovery URLs\n- At least one of the below options depending on the chosen identity provider.\n- Allowed audiences — List of allowed audiences for JWT tokens\n- Allowed clients — List of allowed client identifiers\n- Allowed scopes — List of allowed scopes for JWT tokens\n- Custom claims — Optional custom claim validations (see Custom Claims Validation section below)\n\n```typescript fixture=default\n\n// Optional: Create custom claims (CustomClaimOperator and GatewayCustomClaim from agentcore)\nconst customClaims = [\n agentcore.GatewayCustomClaim.withStringValue('department', 'engineering'),\n agentcore.GatewayCustomClaim.withStringArrayValue('roles', ['admin'], agentcore.CustomClaimOperator.CONTAINS),\n agentcore.GatewayCustomClaim.withStringArrayValue('permissions', ['read', 'write'], agentcore.CustomClaimOperator.CONTAINS_ANY),\n];\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n customClaims: customClaims, // Optional custom claims\n }),\n});\n```\n\n**IAM** – Authorizes through the credentials of the AWS IAM identity trying to access the gateway.\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingAwsIam(),\n});\n\n// Grant access to a Lambda function's role\nconst lambdaRole = new iam.Role(this, \"LambdaRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// The Lambda needs permission to invoke the gateway\ngateway.grantInvoke(lambdaRole);\n```\n\n**Cognito with M2M (Machine-to-Machine) Authentication (Default)** – When no authorizer is specified, the construct automatically creates a Cognito User Pool configured for OAuth 2.0 client credentials flow. This enables machine-to-machine authentication suitable for AI agents and service-to-service communication.\n\nFor more information, see [Setting up Amazon Cognito for Gateway inbound authorization](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity-idp-cognito.html).\n\n```typescript fixture=default\n// Create a gateway with default Cognito M2M authorizer\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// Access the Cognito resources for authentication setup\nconst userPool = gateway.userPool;\nconst userPoolClient = gateway.userPoolClient;\n\n// Get the token endpoint URL and OAuth scopes for client credentials flow\nconst tokenEndpointUrl = gateway.tokenEndpointUrl;\nconst oauthScopes = gateway.oauthScopes;\n// oauthScopes are in the format: ['{resourceServerId}/read', '{resourceServerId}/write']\n```\n\n**Using Cognito User Pool Explicitly with Custom Claims** – You can also use an existing Cognito User Pool with custom claims:\n\n```typescript fixture=default\ndeclare const userPool: cognito.UserPool;\ndeclare const userPoolClient: cognito.UserPoolClient;\n\n// Optional: Create custom claims (CustomClaimOperator and GatewayCustomClaim from agentcore)\nconst customClaims = [\n agentcore.GatewayCustomClaim.withStringValue('department', 'engineering'),\n agentcore.GatewayCustomClaim.withStringArrayValue('roles', ['admin'], agentcore.CustomClaimOperator.CONTAINS),\n agentcore.GatewayCustomClaim.withStringArrayValue('permissions', ['read', 'write'], agentcore.CustomClaimOperator.CONTAINS_ANY),\n];\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCognito({\n userPool: userPool,\n allowedClients: [userPoolClient],\n allowedAudiences: [\"audience1\"],\n allowedScopes: [\"read\", \"write\"],\n customClaims: customClaims, // Optional custom claims\n }),\n});\n```\n\nTo authenticate with the gateway, request an access token using the client credentials flow and use it to call Gateway endpoints. For more information about the token endpoint, see [The token issuer endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html).\n\nThe following is an example of a token request using curl:\n\n```bash\ncurl -X POST \"${TOKEN_ENDPOINT_URL}\" \\\n -H \"Content-Type: application/x-www-form-urlencoded\" \\\n -d \"grant_type=client_credentials\" \\\n -d \"client_id=${USER_POOL_CLIENT_ID}\" \\\n -d \"client_secret=${CLIENT_SECRET}\" \\\n -d \"scope=${OAUTH_SCOPES}\"\n```\n\n### Gateway with KMS Encryption\n\nYou can provide a KMS key, and configure the authorizer as well as the protocol configuration.\n\n```typescript fixture=default\n// Create a KMS key for encryption\nconst encryptionKey = new kms.Key(this, \"GatewayEncryptionKey\", {\n enableKeyRotation: true,\n description: \"KMS key for gateway encryption\",\n});\n\n// Create gateway with KMS encryption\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-encrypted-gateway\",\n description: \"Gateway with KMS encryption\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n }),\n kmsKey: encryptionKey,\n exceptionLevel: agentcore.GatewayExceptionLevel.DEBUG,\n});\n```\n\n### Gateway with Custom Execution Role\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"GatewayExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n managedPolicies: [\n iam.ManagedPolicy.fromAwsManagedPolicyName(\"AmazonBedrockAgentCoreGatewayExecutionRolePolicy\"),\n ],\n});\n\n// Create gateway with custom execution role\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n description: \"Gateway with custom execution role\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n }),\n role: executionRole,\n});\n```\n\n### Gateway IAM Permissions\n\nThe Gateway construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a gateway\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n description: \"Gateway for external service integration\",\n protocolConfiguration: new agentcore.McpProtocolConfiguration({\n instructions: \"Use this gateway to connect to external MCP tools\",\n searchType: agentcore.McpGatewaySearchType.SEMANTIC,\n supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],\n }),\n authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({\n discoveryUrl: \"https://auth.example.com/.well-known/openid-configuration\",\n allowedAudience: [\"my-app\"],\n allowedClients: [\"my-client-id\"],\n allowedScopes: [\"read\", \"write\"],\n }),\n});\n\n// Create a role that needs access to the gateway\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\ngateway.grantRead(userRole);\n\n// Grant manage permissions (Create, Update, Delete actions)\ngateway.grantManage(userRole);\n\n// Grant specific custom permissions\ngateway.grant(userRole, \"bedrock-agentcore:GetGateway\");\n```\n\n## Gateway Target\n\nAfter Creating gateways, you can add targets which define the tools that your gateway will host. Gateway supports multiple target\ntypes including Lambda functions and API specifications (either OpenAPI schemas or Smithy models). Gateway allows you to attach multiple\ntargets to a Gateway and you can change the targets / tools attached to a gateway at any point. Each target can have its own\ncredential provider attached enabling you to securely access targets whether they need IAM, API Key, or OAuth credentials.\n\n### Gateway Target Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `gatewayTargetName` | `string` | No | The name of the gateway target. Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen). If not provided, a unique name will be auto-generated |\n| `description` | `string` | No | Optional description for the gateway target. Maximum 200 characters |\n| `gateway` | `IGateway` | Yes | The gateway this target belongs to |\n| `targetConfiguration` | `ITargetConfiguration` | Yes | The target configuration (Lambda, OpenAPI, Smithy, or API Gateway). **Note:** Users typically don't create this directly. When using convenience methods like `GatewayTarget.forLambda()`, `GatewayTarget.forOpenApi()`, `GatewayTarget.forSmithy()`, `GatewayTarget.forApiGateway()`, `GatewayTarget.forMcpServer()` or the gateway's `addLambdaTarget()`, `addOpenApiTarget()`, `addSmithyTarget()`, `addApiGatewayTarget()`, `addMcpServerTarget()` methods, this configuration is created internally for you. Only needed when using the GatewayTarget constructor directly for [advanced scenarios](#advanced-usage-direct-configuration-for-gateway-target). |\n| `credentialProviderConfigurations` | `IGatewayCredentialProvider[]` | No | Credential providers for authentication. Defaults to `[GatewayCredentialProvider.fromIamRole()]`. Use `GatewayCredentialProvider.fromApiKeyIdentityArn()`, `GatewayCredentialProvider.fromOauthIdentityArn()`, or `GatewayCredentialProvider.fromIamRole()` |\n| `validateOpenApiSchema` | `boolean` | No | (OpenAPI targets only) Whether to validate the OpenAPI schema at synthesis time. Defaults to `true`. Only applies to inline and local asset schemas. For more information refer here <https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-schema-openapi.html> |\n\nThis approach gives you full control over the configuration but is typically not necessary for most use cases.\n\n### Targets types\n\nYou can create the following targets types:\n\n**Lambda Target**: Lambda targets allow you to connect your gateway to AWS Lambda functions that implement your tools. This is useful\nwhen you want to execute custom code in response to tool invocations.\n\n- Supports GATEWAY_IAM_ROLE credential provider only\n- Ideal for custom serverless function integration\n- Need tool schema (tool schema is a blueprint that describes the functions your Lambda provides to AI agents).\n The construct provide [3 ways to upload a tool schema to Lambda target](#tools-schema-for-lambda-target)\n- When using the default IAM authentication (no `credentialProviderConfigurations` specified),\n the construct automatocally grants the gateway role permission to invoke your Lambda function (`lambda:InvokeFunction`).\n\n**OpenAPI Schema Target** : OpenAPI widely used standard for describing RESTful APIs. Gateway supports OpenAPI 3.0\nspecifications for defining API targets. It connects to REST APIs using OpenAPI specifications\n\n- Supports OAUTH and API_KEY credential providers (Do not support IAM, you must provide `credentialProviderConfigurations`)\n- Ideal for integrating with external REST services\n- Need API schema. The construct provide [3 ways to upload a API schema to OpenAPI target](#api-schema-for-openapi-and-smithy-target)\n\n**Smithy Model Target** : Smithy is a language for defining services and software development kits (SDKs). Smithy models provide\na more structured approach to defining APIs compared to OpenAPI, and are particularly useful for connecting to AWS services.\nAgentCore Gateway supports built-in AWS service models only. It connects to services using Smithy model definitions\n\n- Supports OAUTH and API_KEY credential providers\n- Ideal for AWS service integrations\n- Need API schema. The construct provide 3 ways to upload a API schema to Smity target\n- When using the default IAM authentication (no `credentialProviderConfigurations` specified), The construct only\n grants permission to read the Smithy schema file from S3. You MUST manually grant permissions for the gateway\n role to invoke the actual Smithy API endpoints\n\n> Note: For Smithy model targets that access AWS services, your Gateway's execution role needs permissions to access those services.\nFor example, for a DynamoDB target, your execution role needs permissions to perform DynamoDB operations.\nThis is not managed by the construct due to the large number of options. Please refer to\n[Smithy Model Permission](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-prerequisites-permissions.html) for example.\n\n**MCP Server Target**: Model Context Protocol (MCP) servers provide external tools, data access, and custom functions for AI agents.\nMCP servers enable agents to interact with external systems and services through a standardized protocol. Gateway automatically\ndiscovers and indexes available tools from MCP servers through synchronization.\n\n**Key Features:**\n\n- Requires explicit authentication configuration (OAuth2 recommended, empty array for NoAuth)\n- Ideal for connecting to external MCP-compliant servers\n- The endpoint must use HTTPS protocol\n- Supported MCP protocol versions: 2025-06-18, 2025-03-26\n- Automatic tool discovery through synchronization\n\n**Synchronization Behavior:**\n\nMCP Server targets require synchronization to discover and index available tools:\n\n- **Implicit Synchronization (Automatic)**: Tool discovery happens automatically during:\n - Target creation (`CreateGatewayTarget`)\n - Target updates (`UpdateGatewayTarget`)\n - The Gateway calls the MCP server's `tools/list` endpoint and indexes tools without user intervention\n\n- **Explicit Synchronization (Manual)**: When the MCP server's tools change independently (new tools added, schemas modified, tools removed):\n - The Gateway's tool catalog becomes stale\n - Call the `SynchronizeGatewayTargets` API to refresh the catalog\n - Use the `grantSync()` method to grant permissions to Lambda functions, CI/CD pipelines, or scheduled tasks that will trigger synchronization\n\n**Authentication & Permissions:**\n\nWhen using OAuth2, the Gateway service role automatically receives:\n\n- `bedrock-agentcore:GetWorkloadAccessToken`\n- `bedrock-agentcore:GetResourceOauth2Token`\n- `secretsmanager:GetSecretValue`\n- KMS decrypt (if secrets are encrypted)\n\nFor explicit synchronization, use `grantSync()` to grant `bedrock-agentcore:SynchronizeGatewayTargets` permission to your operator roles.\n\n> For more information, refer to the [MCP Server Target documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-target-MCPservers.html).\n\n### Understanding Tool Naming\n\nWhen tools are exposed through gateway targets, AgentCore Gateway prefixes each tool name with the target name to ensure uniqueness across multiple targets. This is important to understand when building your application logic.\n\n**Naming Pattern:**\n\n**Example:**\n\nIf your target is named `my-lambda-target` and provides a tool called `calculate_price`, agents will discover and invoke it as `my-lambda-target__calculate_price`.\n\n**Important Considerations:**\n\n- **For Lambda Targets**: Your Lambda handler must strip the target name prefix before processing the tool request. The full tool name (with prefix) is sent in the event.\n- **For MCP Server Targets**: The MCP server receives tool calls with the prefixed name from the gateway.\n- **For OpenAPI/Smithy Targets**: The gateway handles the prefix automatically when mapping to API operations based on the `operationId`.\n\nThis naming convention ensures that:\n\n- Tools from different targets don't collide even if they have the same name\n- Agents can access tools from multiple targets through a single gateway\n- Tool names remain unique in the unified tool catalog\n\nFor more details, see the [Gateway Tool Naming Documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-tool-naming.html).\n\n### Tools schema For Lambda target\n\nThe lambda target need tools schema to understand the fuunction lambda provides. You can upload the tool schema by following 3 ways:\n\n- From a local asset file\n\n```typescript\nconst toolSchema = agentcore.ToolSchema.fromLocalAsset(\n path.join(__dirname, \"schemas\", \"my-tool-schema.json\")\n );\n```\n\n- From an existing S3 file:\n\n```typescript\n\nconst toolSchema = agentcore.ToolSchema.fromS3File(\n s3.Bucket.fromBucketName(this, \"SchemasBucket\", \"my-schemas-bucket\"),\n \"tools/complex-tool-schema.json\",\n \"123456789012\"\n );\n```\n\n- From Inline:\n\n```typescript\nconst toolSchema = agentcore.ToolSchema.fromInline([{\n name: \"hello_world\",\n description: \"A simple hello world tool\",\n inputSchema: {\n type: agentcore.SchemaDefinitionType.OBJECT,\n properties: {\n name: {\n type: agentcore.SchemaDefinitionType.STRING,\n description: \"The name to greet\",\n },\n },\n required: [\"name\"],\n },\n }]);\n\n```\n\n### Api schema For OpenAPI and Smithy target\n\nThe OpenAPI and Smithy target need API Schema. The Gateway construct provide three ways to upload API schema for your target:\n\n- From a local asset file (requires binding to scope):\n\n```typescript fixture=default\n// When using ApiSchema.fromLocalAsset, you must bind the schema to a scope\nconst schema = agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, \"mySchema.yml\"));\n\nschema.bind(this);\n```\n\n- From an inline schema:\n\n```typescript fixture=default\nconst inlineSchema = agentcore.ApiSchema.fromInline(`\nopenapi: 3.0.3\ninfo:\n title: Library API\n version: 1.0.0\npaths:\n /search:\n get:\n summary: Search for books\n operationId: searchBooks\n parameters:\n - name: query\n in: query\n required: true\n schema:\n type: string\n`);\n```\n\n- From an existing S3 file:\n\n```typescript fixture=default\nconst bucket = s3.Bucket.fromBucketName(this, \"ExistingBucket\", \"my-schema-bucket\");\nconst s3Schema = agentcore.ApiSchema.fromS3File(bucket, \"schemas/action-group.yaml\");\n```\n\n### Outbound auth\n\nOutbound authorization lets Amazon Bedrock AgentCore gateways securely access gateway targets on behalf of users authenticated\nand authorized during Inbound Auth.\n\nAgentCore Gateway supports the following types of outbound authorization:\n\n**IAM-based outbound authorization** – The gateway uses its execution role to authenticate with AWS services. This is the default\n and most common approach for Lambda targets and AWS service integrations.\n\n**2-legged OAuth (OAuth 2LO)** – Use OAuth 2.0 two-legged flow (2LO) for targets that require OAuth authentication.\nThe gateway authenticates on its own behalf, not on behalf of a user.\n\n**API key** – Use the AgentCore service/AWS console to generate an API key to authenticate access to the gateway target.\n\n**Note > You need to set up the outbound identity before you can create a gateway target.\n\n### Basic Gateway Target Creation\n\nYou can create targets in two ways: using the static factory methods on `GatewayTarget` or using the convenient `addTarget` methods on the gateway instance.\n\n#### Using addTarget methods (Recommended)\n\nThis approach is recommended for most use cases, especially when creating targets alongside the gateway. It provides a cleaner, more fluent API by eliminating the need to explicitly pass the gateway reference.\n\nBelow are the examples on how you can create Lambda, Smithy, OpenAPI, MCP Server, and API Gateway targets using `addTarget` methods.\n\n```typescript fixture=default\n// Create a gateway first\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst lambdaFunction = new lambda.Function(this, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_22_X,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\n exports.handler = async (event) => {\n return {\n statusCode: 200,\n body: JSON.stringify({ message: 'Hello from Lambda!' })\n };\n };\n `),\n});\n\nconst lambdaTarget = gateway.addLambdaTarget(\"MyLambdaTarget\", {\n gatewayTargetName: \"my-lambda-target\",\n description: \"Lambda function target\",\n lambdaFunction: lambdaFunction,\n toolSchema: agentcore.ToolSchema.fromInline([\n {\n name: \"hello_world\",\n description: \"A simple hello world tool\",\n inputSchema: {\n type: agentcore.SchemaDefinitionType.OBJECT,\n properties: {\n name: {\n type: agentcore.SchemaDefinitionType.STRING,\n description: \"The name to greet\",\n },\n },\n required: [\"name\"],\n },\n },\n ]),\n});\n```\n\n- OpenAPI Target\n\n``` typescript\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// These ARNs are returned when creating the API key credential provider via Console or API\nconst apiKeyProviderArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/apikeycredentialprovider/my-apikey\"\nconst apiKeySecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-apikey-secret-abc123\"\n\nconst bucket = s3.Bucket.fromBucketName(this, \"ExistingBucket\", \"my-schema-bucket\");\nconst s3mySchema = agentcore.ApiSchema.fromS3File(bucket, \"schemas/myschema.yaml\");\n\n// Add an OpenAPI target directly to the gateway\nconst target = gateway.addOpenApiTarget(\"MyTarget\", {\n gatewayTargetName: \"my-api-target\",\n description: \"Target for external API integration\",\n apiSchema: s3mySchema,\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromApiKeyIdentityArn({\n providerArn: apiKeyProviderArn,\n secretArn: apiKeySecretArn,\n credentialLocation: agentcore.ApiKeyCredentialLocation.header({\n credentialParameterName: \"X-API-Key\",\n }),\n }),\n ],\n});\n\n// This make sure your s3 bucket is available before target\ntarget.node.addDependency(bucket);\n```\n\n- Smithy Target\n\n```typescript fixture=default\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst smithySchema = agentcore.ApiSchema.fromLocalAsset(\n path.join(__dirname, \"models\", \"smithy-model.json\")\n);\nsmithySchema.bind(this);\n\nconst smithyTarget = gateway.addSmithyTarget(\"MySmithyTarget\", {\n gatewayTargetName: \"my-smithy-target\",\n description: \"Smithy model target\",\n smithyModel: smithySchema,\n\n});\n```\n\n- MCP Server Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// OAuth2 authentication (recommended)\n// Note: Create the OAuth provider using AWS console or Identity L2 construct when available\nconst oauthProviderArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/oauth2credentialprovider/my-oauth\";\nconst oauthSecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-oauth-secret-abc123\";\n\n// Add an MCP server target directly to the gateway\nconst mcpTarget = gateway.addMcpServerTarget(\"MyMcpServer\", {\n gatewayTargetName: \"my-mcp-server\",\n description: \"External MCP server integration\",\n endpoint: \"https://my-mcp-server.example.com\",\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromOauthIdentityArn({\n providerArn: oauthProviderArn,\n secretArn: oauthSecretArn,\n scopes:['mcp-runtime-server/invoke']\n }),\n ],\n});\n\n// Grant sync permission to a Lambda function that will trigger synchronization\nconst syncFunction = new lambda.Function(this, \"SyncFunction\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\nimport boto3\n\ndef handler(event, context):\n client = boto3.client('bedrock-agentcore')\n response = client.synchronize_gateway_targets(\n gatewayIdentifier=event['gatewayId'],\n targetIds=[event['targetId']]\n )\n return response\n `),\n});\n\nmcpTarget.grantSync(syncFunction);\n```\n\n- API Gateway Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst api = new apigateway.RestApi(this, 'MyApi', {\n restApiName: 'my-api',\n});\n\n// Uses IAM authorization for outbound auth by default\nconst apiGatewayTarget = gateway.addApiGatewayTarget(\"MyApiGatewayTarget\", {\n restApi: api,\n apiGatewayToolConfiguration: {\n toolFilters: [\n {\n filterPath: \"/pets/*\",\n methods: [agentcore.ApiGatewayHttpMethod.GET],\n },\n ],\n },\n});\n```\n\n#### Using static factory methods\n\nUse static factory methods when working with imported gateways, creating targets in different constructs/stacks, or when you need more explicit control over the construct tree hierarchy.\n\nCreate Gateway target using static convenience methods.\n\n- Lambda Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst lambdaFunction = new lambda.Function(this, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_22_X,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\n exports.handler = async (event) => {\n return {\n statusCode: 200,\n body: JSON.stringify({ message: 'Hello from Lambda!' })\n };\n };\n `),\n});\n\n// Create a gateway target with Lambda and tool schema\nconst target = agentcore.GatewayTarget.forLambda(this, \"MyLambdaTarget\", {\n gatewayTargetName: \"my-lambda-target\",\n description: \"Target for Lambda function integration\",\n gateway: gateway,\n lambdaFunction: lambdaFunction,\n toolSchema: agentcore.ToolSchema.fromLocalAsset(\n path.join(__dirname, \"schemas\", \"my-tool-schema.json\")\n ),\n});\n```\n\n- OpenAPI Target\n\n```typescript fixture=default\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// outbound auth (Use AWS console to create it, Once Identity L2 construct is available you can use it to create identity)\nconst apiKeyIdentityArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/apikeycredentialprovider/my-apikey\"\nconst apiKeySecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-apikey-secret-abc123\"\n\nconst opneapiSchema = agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, \"mySchema.yml\"));\nopneapiSchema.bind(this);\n\n// Create a gateway target with OpenAPI Schema\nconst target = agentcore.GatewayTarget.forOpenApi(this, \"MyTarget\", {\n gatewayTargetName: \"my-api-target\",\n description: \"Target for external API integration\",\n gateway: gateway, // Note: you need to pass the gateway reference\n apiSchema: opneapiSchema,\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromApiKeyIdentityArn({\n providerArn: apiKeyIdentityArn,\n secretArn: apiKeySecretArn\n }),\n ],\n});\n\n```\n\n- Smithy Target\n\n```typescript fixture=default\n\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst smithySchema = agentcore.ApiSchema.fromLocalAsset(\n path.join(__dirname, \"models\", \"smithy-model.json\")\n);\nsmithySchema.bind(this);\n\n// Create a gateway target with Smithy Model and OAuth\nconst target = agentcore.GatewayTarget.forSmithy(this, \"MySmithyTarget\", {\n gatewayTargetName: \"my-smithy-target\",\n description: \"Target for Smithy model integration\",\n gateway: gateway,\n smithyModel: smithySchema,\n});\n\n```\n\n- MCP Server Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// OAuth2 authentication (recommended)\n// Note: Create the OAuth provider using AWS console or Identity L2 construct when available\nconst oauthProviderArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/oauth2credentialprovider/my-oauth\";\nconst oauthSecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-oauth-secret-abc123\";\n\n// Create a gateway target with MCP Server\nconst mcpTarget = agentcore.GatewayTarget.forMcpServer(this, \"MyMcpServer\", {\n gatewayTargetName: \"my-mcp-server\",\n description: \"External MCP server integration\",\n gateway: gateway,\n endpoint: \"https://my-mcp-server.example.com\",\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromOauthIdentityArn({\n providerArn: oauthProviderArn,\n secretArn: oauthSecretArn,\n scopes:['mcp-runtime-server/invoke']\n }),\n ],\n});\n```\n\n- API Gateway Target\n\n```typescript fixture=default\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst api = new apigateway.RestApi(this, 'MyApi', {\n restApiName: 'my-api',\n});\n\n// Create a gateway target using the static factory method\nconst apiGatewayTarget = agentcore.GatewayTarget.forApiGateway(this, \"MyApiGatewayTarget\", {\n gatewayTargetName: \"my-api-gateway-target\",\n description: \"Target for API Gateway REST API integration\",\n gateway: gateway,\n restApi: api,\n apiGatewayToolConfiguration: {\n toolFilters: [\n {\n filterPath: \"/pets/*\",\n methods: [agentcore.ApiGatewayHttpMethod.GET, agentcore.ApiGatewayHttpMethod.POST],\n },\n ],\n },\n metadataConfiguration: {\n allowedRequestHeaders: [\"X-User-Id\"],\n allowedQueryParameters: [\"limit\"],\n },\n});\n```\n\n### Advanced Usage: Direct Configuration for gateway target\n\nFor advanced use cases where you need full control over the target configuration, you can create configurations manually using the static factory methods and use the GatewayTarget constructor directly.\n\n#### Configuration Factory Methods\n\nEach target type has a corresponding configuration class with a static `create()` method:\n\n- **Lambda**: `LambdaTargetConfiguration.create(lambdaFunction, toolSchema)`\n- **OpenAPI**: `OpenApiTargetConfiguration.create(apiSchema, validateSchema?)`\n- **Smithy**: `SmithyTargetConfiguration.create(smithyModel)`\n- **API Gateway**: `ApiGatewayTargetConfiguration.create(props)`\n\n#### Example: Lambda Target with Custom Configuration\n\n```typescript\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst myLambdaFunction = new lambda.Function(this, \"MyFunction\", {\n runtime: lambda.Runtime.NODEJS_22_X,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\n exports.handler = async (event) => ({ statusCode: 200 });\n `),\n});\n\nconst myToolSchema = agentcore.ToolSchema.fromInline([{\n name: \"my_tool\",\n description: \"My custom tool\",\n inputSchema: {\n type: agentcore.SchemaDefinitionType.OBJECT,\n properties: {},\n },\n}]);\n\n// Create a custom Lambda configuration\nconst customConfig = agentcore.LambdaTargetConfiguration.create(\n myLambdaFunction,\n myToolSchema\n);\n\n// Use the GatewayTarget constructor directly\nconst target = new agentcore.GatewayTarget(this, \"AdvancedTarget\", {\n gateway: gateway,\n gatewayTargetName: \"advanced-target\",\n targetConfiguration: customConfig, // Manually created configuration\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromIamRole()\n ]\n});\n```\n\nThis approach gives you full control over the configuration but is typically not necessary for most use cases. The convenience methods (`GatewayTarget.forLambda()`, `GatewayTarget.forOpenApi()`, `GatewayTarget.forSmithy()`, `GatewayTarget.forApiGateway()`) handle all of this internally.\n\n### Gateway Interceptors\n\nGateway interceptors allow you to run custom code during each gateway invocation to implement fine-grained access control, transform requests and responses, or implement custom authorization logic. A gateway can have at most one REQUEST interceptor and one RESPONSE interceptor.\n\n**Interceptor Types:**\n\n- **REQUEST interceptors**: Execute before the gateway calls the target. Useful for request validation, transformation, or custom authorization\n- **RESPONSE interceptors**: Execute after the target responds but before the gateway sends the response back. Useful for response transformation, filtering, or adding custom headers\n\n**Security Best Practices:**\n\n1. Keep `passRequestHeaders` disabled unless absolutely necessary (default: false)\n2. Implement idempotent Lambda functions (gateway may retry on failures)\n3. Restrict gateway execution role to specific Lambda functions\n4. Avoid logging sensitive information in your interceptor\n\nFor more information, see the [Gateway Interceptors documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-interceptors.html).\n\n#### Adding Interceptors via Constructor\n\n```typescript fixture=default\n// Create Lambda functions for interceptors\nconst requestInterceptorFn = new lambda.Function(this, \"RequestInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Validate and transform request\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayRequest\": event[\"mcp\"][\"gatewayRequest\"]\n }\n }\n `),\n});\n\nconst responseInterceptorFn = new lambda.Function(this, \"ResponseInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Filter or transform response\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayResponse\": event[\"mcp\"][\"gatewayResponse\"]\n }\n }\n `),\n});\n\n// Create gateway with interceptors\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n interceptorConfigurations: [\n agentcore.LambdaInterceptor.forRequest(requestInterceptorFn, {\n passRequestHeaders: true // Only if you need to inspect headers\n }),\n agentcore.LambdaInterceptor.forResponse(responseInterceptorFn)\n ]\n});\n```\n\n**Automatic Permission Granting:**\n\nWhen you add a Lambda interceptor to a gateway (either via constructor or `addInterceptor()`), the gateway's IAM role automatically receives `lambda:InvokeFunction` permission on the Lambda function. This permission grant happens internally during the bind process - you do not need to manually configure these IAM permissions.\n\n#### Adding Interceptors Dynamically\n\n```typescript fixture=default\n// Create a gateway first\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// Create Lambda functions for interceptors\nconst requestInterceptorFn = new lambda.Function(this, \"RequestInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Custom request validation logic\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayRequest\": event[\"mcp\"][\"gatewayRequest\"]\n }\n }\n `),\n});\n\nconst responseInterceptorFn = new lambda.Function(this, \"ResponseInterceptor\", {\n runtime: lambda.Runtime.PYTHON_3_12,\n handler: \"index.handler\",\n code: lambda.Code.fromInline(`\ndef handler(event, context):\n # Filter sensitive data from response\n return {\n \"interceptorOutputVersion\": \"1.0\",\n \"mcp\": {\n \"transformedGatewayResponse\": event[\"mcp\"][\"gatewayResponse\"]\n }\n }\n `),\n});\n\ngateway.addInterceptor(\n agentcore.LambdaInterceptor.forRequest(requestInterceptorFn, {\n passRequestHeaders: false // Default, headers not passed for security\n })\n);\n\ngateway.addInterceptor(\n agentcore.LambdaInterceptor.forResponse(responseInterceptorFn)\n);\n```\n\n### Gateway Target IAM Permissions\n\nThe Gateway Target construct provides convenient methods for granting IAM permissions:\n\n```typescript fixture=default\n// Create a gateway and target\nconst gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst smithySchema = agentcore.ApiSchema.fromLocalAsset(\n path.join(__dirname, \"models\", \"smithy-model.json\")\n);\nsmithySchema.bind(this);\n\n// Create a gateway target with Smithy Model and OAuth\nconst target = agentcore.GatewayTarget.forSmithy(this, \"MySmithyTarget\", {\n gatewayTargetName: \"my-smithy-target\",\n description: \"Target for Smithy model integration\",\n gateway: gateway,\n smithyModel: smithySchema,\n});\n\n// Create a role that needs access to the gateway target\nconst userRole = new iam.Role(this, \"UserRole\", {\n assumedBy: new iam.ServicePrincipal(\"lambda.amazonaws.com\"),\n});\n\n// Grant read permissions (Get and List actions)\ntarget.grantRead(userRole);\n\n// Grant manage permissions (Create, Update, Delete actions)\ntarget.grantManage(userRole);\n\n// Grant specific custom permissions\ntarget.grant(userRole, \"bedrock-agentcore:GetGatewayTarget\");\n\n\n// Grants permission to invoke this Gateway\ngateway.grantInvoke(userRole);\n```\n\n## Memory\n\nMemory is a critical component of intelligence. While Large Language Models (LLMs) have impressive capabilities, they lack persistent memory across conversations. Amazon Bedrock AgentCore Memory addresses this limitation by providing a managed service that enables AI agents to maintain context over time, remember important facts, and deliver consistent, personalized experiences.\n\nAgentCore Memory operates on two levels:\n\n- **Short-Term Memory**: Immediate conversation context and session-based information that provides continuity within a single interaction or closely related sessions.\n- **Long-Term Memory**: Persistent information extracted and stored across multiple conversations, including facts, preferences, and summaries that enable personalized experiences over time.\n\nWhen you interact with the memory via the `CreateEvent` API, you store interactions in Short-Term Memory (STM) instantly. These interactions can include everything from user messages, assistant responses, to tool actions.\n\nTo write to long-term memory, you need to configure extraction strategies which define how and where to store information from conversations for future use. These strategies are asynchronously processed from raw events after every few turns based on the strategy that was selected. You can't create long term memory records directly, as they are extracted asynchronously by AgentCore Memory.\n\n### Memory Properties\n\n| Name | Type | Required | Description |\n|------|------|----------|-------------|\n| `memoryName` | `string` | No | The name of the memory. If not provided, a unique name will be auto-generated |\n| `expirationDuration` | `Duration` | No | Short-term memory expiration in days (between 7 and 365). Default: 90 days |\n| `description` | `string` | No | Optional description for the memory. Default: no description. |\n| `kmsKey` | `IKey` | No | Custom KMS key to use for encryption. Default: Your data is encrypted with a key that AWS owns and manages for you |\n| `memoryStrategies` | `MemoryStrategyBase[]` | No | Built-in extraction strategies to use for this memory. Default: No extraction strategies (short term memory only) |\n| `executionRole` | `iam.IRole` | No | The IAM role that provides permissions for the memory to access AWS services. Default: A new role will be created. |\n| `tags` | `{ [key: string]: string }` | No | Tags for memory. Default: no tags. |\n\n### Basic Memory Creation\n\nBelow you can find how to configure a simple short-term memory (STM) with no long-term memory extraction strategies.\nNote how you set `expirationDuration`, which defines the time the events will be stored in the short-term memory before they expire.\n\n```typescript fixture=default\n\n// Create a basic memory with default settings, no LTM strategies\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"A memory for storing user interactions for a period of 90 days\",\n expirationDuration: cdk.Duration.days(90),\n});\n```\n\nBasic Memory with Custom KMS Encryption\n\n```typescript fixture=default\n// Create a custom KMS key for encryption\nconst encryptionKey = new kms.Key(this, \"MemoryEncryptionKey\", {\n enableKeyRotation: true,\n description: \"KMS key for memory encryption\",\n});\n\n// Create memory with custom encryption\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_encrypted_memory\",\n description: \"Memory with custom KMS encryption\",\n expirationDuration: cdk.Duration.days(90),\n kmsKey: encryptionKey,\n});\n```\n\n### LTM Memory Extraction Stategies\n\nIf you need long-term memory for context recall across sessions, you can setup memory extraction strategies\nto extract the relevant memory from the raw events.\n\nAmazon Bedrock AgentCore Memory has different memory strategies for extracting and organizing information:\n\n- **Summarization**: to summarize interactions to preserve critical context and key insights.\n- **Semantic Memory**: to extract general factual knowledge, concepts and meanings from raw conversations using vector embeddings.\nThis enables similarity-based retrieval of relevant facts and context.\n- **User Preferences**: to extract user behavior patterns from raw conversations.\n\nYou can use built-in extraction strategies for quick setup, or create custom extraction strategies with specific models and prompt templates.\n\n### Memory with Built-in Strategies\n\nThe library provides four built-in LTM strategies. These are default strategies for organizing and extracting memory data,\neach optimized for specific use cases.\n\nFor example: An agent helps multiple users with cloud storage setup. From these conversations,\nsee how each strategy processes users expressing confusion about account connection:\n\n1. **Summarization Strategy** (`MemoryStrategy.usingBuiltInSummarization()`)\nThis strategy compresses conversations into concise overviews, preserving essential context and key insights for quick recall.\nExtracted memory example: Users confused by cloud setup during onboarding.\n\n - Extracts concise summaries to preserve critical context and key insights\n - Namespace: `/strategies/{memoryStrategyId}/actors/{actorId}/sessions/{sessionId}`\n\n2. **Semantic Memory Strategy** (`MemoryStrategy.usingBuiltInSemantic()`)\nDistills general facts, concepts, and underlying meanings from raw conversational data, presenting the information in a context-independent format.\nExtracted memory example: In-context learning = task-solving via examples, no training needed.\n\n - Extracts general factual knowledge, concepts and meanings from raw conversations\n - Namespace: `/strategies/{memoryStrategyId}/actors/{actorId}`\n\n3. **User Preference Strategy** (`MemoryStrategy.usingBuiltInUserPreference()`)\nCaptures individual preferences, interaction patterns, and personalized settings to enhance future experiences.\nExtracted memory example: User needs clear guidance on cloud storage account connection during onboarding.\n\n - Extracts user behavior patterns from raw conversations\n - Namespace: `/strategies/{memoryStrategyId}/actors/{actorId}`\n\n4. **Episodic Memory Strategy** (`MemoryStrategy.usingBuiltInEpisodic()`)\nCaptures meaningful slices of user and system interactions, preserve them into compact records after summarizing.\nExtracted memory example: User first asked about pricing on Monday, then requested feature comparison on Tuesday, finally made purchase decision on Wednesday.\n\n - Captures event sequences and temporal relationships\n - Namespace: `/strategy/{memoryStrategyId}/actor/{actorId}/session/{sessionId}`\n - Reflections: `/strategy/{memoryStrategyId}/actor/{actorId}`\n\n```typescript fixture=default\n// Create memory with built-in strategies\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"Memory with built-in strategies\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [\n agentcore.MemoryStrategy.usingBuiltInSummarization(),\n agentcore.MemoryStrategy.usingBuiltInSemantic(),\n agentcore.MemoryStrategy.usingBuiltInUserPreference(),\n agentcore.MemoryStrategy.usingBuiltInEpisodic(),\n ],\n});\n```\n\nThe name generated for each built in memory strategy is as follows:\n\n- For Summarization: `summary_builtin_cdk001`\n- For Semantic:`semantic_builtin_cdk001>`\n- For User Preferences: `preference_builtin_cdk001`\n- For Episodic : `episodic_builtin_cdkGen0001`\n\n### Memory with custom Strategies\n\nWith Long-Term Memory, organization is managed through Namespaces.\n\nAn `actor` refers to entity such as end users or agent/user combinations. For example, in a coding support chatbot,\nthe actor is usually the developer asking questions. Using the actor ID helps the system know which user the memory belongs to,\nkeeping each user's data separate and organized.\n\nA `session` is usually a single conversation or interaction period between the user and the AI agent.\nIt groups all related messages and events that happen during that conversation.\n\nA `namespace` is used to logically group and organize long-term memories. It ensures data stays neat, separate, and secure.\n\nWith AgentCore Memory, you need to add a namespace when you define a memory strategy. This namespace helps define where the long-term memory\nwill be logically grouped. Every time a new long-term memory is extracted using this memory strategy, it is saved under the namespace you set.\nThis means that all long-term memories are scoped to their specific namespace, keeping them organized and preventing any mix-ups with other\nusers or sessions. You should use a hierarchical format separated by forward slashes /. This helps keep memories organized clearly. As needed,\nyou can choose to use the below pre-defined variables within braces in the namespace based on your applications' organization needs:\n\n- `actorId` – Identifies who the long-term memory belongs to, such as a user\n- `memoryStrategyId` – Shows which memory strategy is being used. This strategy identifier is auto-generated when you create a memory using CreateMemory operation.\n- `sessionId` – Identifies which session or conversation the memory is from.\n\nFor example, if you define the following namespace as the input to your strategy in CreateMemory operation:\n\n```shell\n/strategy/{memoryStrategyId}/actor/{actorId}/session/{sessionId}\n```\n\nAfter memory creation, this namespace might look like:\n\n```shell\n/strategy/summarization-93483043//actor/actor-9830m2w3/session/session-9330sds8\n```\n\nYou can customise the namespace, i.e. where the memories are stored by using the following methods:\n\n1. **Summarization Strategy** (`MemoryStrategy.usingSummarization(props)`)\n1. **Semantic Memory Strategy** (`MemoryStrategy.usingSemantic(props)`)\n1. **User Preference Strategy** (`MemoryStrategy.usingUserPreference(props)`)\n1. **Episodic Memory Strategy** (`MemoryStrategy.usingEpisodic(props)`)\n\n```typescript fixture=default\n// Create memory with custom strategies\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"Memory with custom strategies\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [\n agentcore.MemoryStrategy.usingUserPreference({\n name: \"CustomerPreferences\",\n namespaces: [\"support/customer/{actorId}/preferences\"]\n }),\n agentcore.MemoryStrategy.usingSemantic({\n name: \"CustomerSupportSemantic\",\n namespaces: [\"support/customer/{actorId}/semantic\"]\n }),\n agentcore.MemoryStrategy.usingEpisodic({\n name: \"customerJourneyEpisodic\",\n namespaces: [\"/journey/customer/{actorId}/episodes\"],\n reflectionConfiguration: {\n namespaces: [\"/journey/customer/{actorId}/reflections\"]\n }\n }),\n ],\n});\n```\n\nCustom memory strategies let you tailor memory extraction and consolidation to your specific domain or use case.\nYou can override the prompts for extracting and consolidating semantic, summary, or user preferences.\nYou can also choose the model that you want to use for extraction and consolidation.\n\nThe custom prompts you create are appended to a non-editable system prompt.\n\nSince a custom strategy requires you to invoke certain FMs, you need a role with appropriate permissions. For that, you can:\n\n- Let the L2 construct create a minimum permission role for you when use L2 Bedrock Foundation Models.\n- Use a custom role with the overly permissive `AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy` managed policy.\n- Use a custom role with your own custom policies.\n\n#### Memory with Custom Execution Role\n\nKeep in mind that memories that **do not** use custom strategies do not require a service role.\nSo even if you provide it, it will be ignored as it will never be used.\n\n```typescript fixture=default\n// Create a custom execution role\nconst executionRole = new iam.Role(this, \"MemoryExecutionRole\", {\n assumedBy: new iam.ServicePrincipal(\"bedrock-agentcore.amazonaws.com\"),\n managedPolicies: [\n iam.ManagedPolicy.fromAwsManagedPolicyName(\n \"AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy\"\n ),\n ],\n});\n\n// Create memory with custom execution role\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my_memory\",\n description: \"Memory with custom execution role\",\n expirationDuration: cdk.Duration.days(90),\n executionRole: executionRole,\n});\n```\n\nIn customConsolidation and customExtraction, the model property uses the [@aws-cdk/aws-bedrock-alph](https://www.npmjs.com/package/@aws-cdk/aws-bedrock-alpha) library which must be installed separately.\n\n```typescript fixture=default\n// Create a custom semantic memory strategy\nconst customSemanticStrategy = agentcore.MemoryStrategy.usingSemantic({\n name: \"customSemanticStrategy\",\n description: \"Custom semantic memory strategy\",\n namespaces: [\"/custom/strategies/{memoryStrategyId}/actors/{actorId}\"],\n customConsolidation: {\n model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,\n appendToPrompt: \"Custom consolidation prompt for semantic memory\",\n },\n customExtraction: {\n model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,\n appendToPrompt: \"Custom extraction prompt for semantic memory\",\n },\n});\n\n// Create memory with custom strategy\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my-custom-memory\",\n description: \"Memory with custom strategy\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [customSemanticStrategy],\n});\n```\n\n### Memory with self-managed Strategies\n\nA self-managed strategy in Amazon Bedrock AgentCore Memory gives you complete control over your memory extraction and consolidation pipelines.\nWith a self-managed strategy, you can build custom memory processing workflows while leveraging Amazon Bedrock AgentCore for storage and retrieval.\n\nFor additional information, you can refer to the [developer guide for self managed strategies](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory-self-managed-strategies.html).\n\nCreate the required AWS resources including:\n\n- an S3 bucket in your account where Amazon Bedrock AgentCore will deliver batched event payloads.\n- an SNS topic for job notifications. Use FIFO topics if processing order within sessions is important for your use case.\n\nThe construct will apply the correct permissions to the memory execution role to access these resources.\n\n```typescript fixture=default\n\nconst bucket = new s3.Bucket(this, 'memoryBucket', {\n bucketName: 'test-memory',\n removalPolicy: cdk.RemovalPolicy.DESTROY,\n autoDeleteObjects: true,\n});\n\nconst topic = new sns.Topic(this, 'topic');\n\n// Create a custom semantic memory strategy\nconst selfManagedStrategy = agentcore.MemoryStrategy.usingSelfManaged({\n name: \"selfManagedStrategy\",\n description: \"self managed memory strategy\",\n historicalContextWindowSize: 5,\n invocationConfiguration: {\n topic: topic,\n s3Location: {\n bucketName: bucket.bucketName,\n objectKey: 'memory/',\n }\n },\n triggerConditions: {\n messageBasedTrigger: 1,\n timeBasedTrigger: cdk.Duration.seconds(10),\n tokenBasedTrigger: 100\n }\n});\n\n// Create memory with custom strategy\nconst memory = new agentcore.Memory(this, \"MyMemory\", {\n memoryName: \"my-custom-memory\",\n description: \"Memory with custom strategy\",\n expirationDuration: cdk.Duration.days(90),\n memoryStrategies: [selfManagedStrategy],\n});\n```\n\n### Memory Strategy Methods\n\nYou can add new memory strategies to the memory construct using the `addMemoryStrategy()` method, for instance:\n\n```typescript fixture=default\n// Create memory without initial strategies\nconst memory = new agentcore.Memory(this, \"test-memory\", {\n memoryName: \"test_memory_add_strategy\",\n description: \"A test memory for testing addMemoryStrategy method\",\n expirationDuration: cdk.Duration.days(90),\n});\n\n// Add strategies after instantiation\nmemory.addMemoryStrategy(agentcore.MemoryStrategy.usingBuiltInSummarization());\nmemory.addMemoryStrategy(agentcore.MemoryStrategy.usingBuiltInSemantic());\n```\n"
|
|
8557
8570
|
},
|
|
8558
8571
|
"repository": {
|
|
8559
8572
|
"directory": "packages/@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
@@ -8591,6 +8604,155 @@
|
|
|
8591
8604
|
}
|
|
8592
8605
|
},
|
|
8593
8606
|
"types": {
|
|
8607
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.AddApiGatewayTargetOptions": {
|
|
8608
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
8609
|
+
"datatype": true,
|
|
8610
|
+
"docs": {
|
|
8611
|
+
"stability": "experimental",
|
|
8612
|
+
"summary": "Options for adding an API Gateway target to a gateway.",
|
|
8613
|
+
"example": "const gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst api = new apigateway.RestApi(this, 'MyApi', {\n restApiName: 'my-api',\n});\n\n// Uses IAM authorization for outbound auth by default\nconst apiGatewayTarget = gateway.addApiGatewayTarget(\"MyApiGatewayTarget\", {\n restApi: api,\n apiGatewayToolConfiguration: {\n toolFilters: [\n {\n filterPath: \"/pets/*\",\n methods: [agentcore.ApiGatewayHttpMethod.GET],\n },\n ],\n },\n});",
|
|
8614
|
+
"custom": {
|
|
8615
|
+
"exampleMetadata": "fixture=default infused"
|
|
8616
|
+
}
|
|
8617
|
+
},
|
|
8618
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.AddApiGatewayTargetOptions",
|
|
8619
|
+
"kind": "interface",
|
|
8620
|
+
"locationInModule": {
|
|
8621
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8622
|
+
"line": 171
|
|
8623
|
+
},
|
|
8624
|
+
"name": "AddApiGatewayTargetOptions",
|
|
8625
|
+
"properties": [
|
|
8626
|
+
{
|
|
8627
|
+
"abstract": true,
|
|
8628
|
+
"docs": {
|
|
8629
|
+
"stability": "experimental",
|
|
8630
|
+
"summary": "Tool configuration defining which operations to expose."
|
|
8631
|
+
},
|
|
8632
|
+
"immutable": true,
|
|
8633
|
+
"locationInModule": {
|
|
8634
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8635
|
+
"line": 201
|
|
8636
|
+
},
|
|
8637
|
+
"name": "apiGatewayToolConfiguration",
|
|
8638
|
+
"type": {
|
|
8639
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolConfiguration"
|
|
8640
|
+
}
|
|
8641
|
+
},
|
|
8642
|
+
{
|
|
8643
|
+
"abstract": true,
|
|
8644
|
+
"docs": {
|
|
8645
|
+
"stability": "experimental",
|
|
8646
|
+
"summary": "The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint:prefer-ref-interface]."
|
|
8647
|
+
},
|
|
8648
|
+
"immutable": true,
|
|
8649
|
+
"locationInModule": {
|
|
8650
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8651
|
+
"line": 190
|
|
8652
|
+
},
|
|
8653
|
+
"name": "restApi",
|
|
8654
|
+
"type": {
|
|
8655
|
+
"fqn": "aws-cdk-lib.aws_apigateway.IRestApi"
|
|
8656
|
+
}
|
|
8657
|
+
},
|
|
8658
|
+
{
|
|
8659
|
+
"abstract": true,
|
|
8660
|
+
"docs": {
|
|
8661
|
+
"default": "- Empty array (service handles IAM automatically)",
|
|
8662
|
+
"stability": "experimental",
|
|
8663
|
+
"summary": "Credential providers for authentication API Gateway targets support IAM and API key authentication."
|
|
8664
|
+
},
|
|
8665
|
+
"immutable": true,
|
|
8666
|
+
"locationInModule": {
|
|
8667
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8668
|
+
"line": 208
|
|
8669
|
+
},
|
|
8670
|
+
"name": "credentialProviderConfigurations",
|
|
8671
|
+
"optional": true,
|
|
8672
|
+
"type": {
|
|
8673
|
+
"collection": {
|
|
8674
|
+
"elementtype": {
|
|
8675
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ICredentialProviderConfig"
|
|
8676
|
+
},
|
|
8677
|
+
"kind": "array"
|
|
8678
|
+
}
|
|
8679
|
+
}
|
|
8680
|
+
},
|
|
8681
|
+
{
|
|
8682
|
+
"abstract": true,
|
|
8683
|
+
"docs": {
|
|
8684
|
+
"default": "- No description",
|
|
8685
|
+
"stability": "experimental",
|
|
8686
|
+
"summary": "Optional description for the gateway target."
|
|
8687
|
+
},
|
|
8688
|
+
"immutable": true,
|
|
8689
|
+
"locationInModule": {
|
|
8690
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8691
|
+
"line": 183
|
|
8692
|
+
},
|
|
8693
|
+
"name": "description",
|
|
8694
|
+
"optional": true,
|
|
8695
|
+
"type": {
|
|
8696
|
+
"primitive": "string"
|
|
8697
|
+
}
|
|
8698
|
+
},
|
|
8699
|
+
{
|
|
8700
|
+
"abstract": true,
|
|
8701
|
+
"docs": {
|
|
8702
|
+
"default": "- auto generate",
|
|
8703
|
+
"stability": "experimental",
|
|
8704
|
+
"summary": "The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen)."
|
|
8705
|
+
},
|
|
8706
|
+
"immutable": true,
|
|
8707
|
+
"locationInModule": {
|
|
8708
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8709
|
+
"line": 177
|
|
8710
|
+
},
|
|
8711
|
+
"name": "gatewayTargetName",
|
|
8712
|
+
"optional": true,
|
|
8713
|
+
"type": {
|
|
8714
|
+
"primitive": "string"
|
|
8715
|
+
}
|
|
8716
|
+
},
|
|
8717
|
+
{
|
|
8718
|
+
"abstract": true,
|
|
8719
|
+
"docs": {
|
|
8720
|
+
"default": "- No metadata configuration",
|
|
8721
|
+
"stability": "experimental",
|
|
8722
|
+
"summary": "Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters."
|
|
8723
|
+
},
|
|
8724
|
+
"immutable": true,
|
|
8725
|
+
"locationInModule": {
|
|
8726
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8727
|
+
"line": 215
|
|
8728
|
+
},
|
|
8729
|
+
"name": "metadataConfiguration",
|
|
8730
|
+
"optional": true,
|
|
8731
|
+
"type": {
|
|
8732
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.MetadataConfiguration"
|
|
8733
|
+
}
|
|
8734
|
+
},
|
|
8735
|
+
{
|
|
8736
|
+
"abstract": true,
|
|
8737
|
+
"docs": {
|
|
8738
|
+
"default": "- Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName)",
|
|
8739
|
+
"stability": "experimental",
|
|
8740
|
+
"summary": "The stage name of the REST API."
|
|
8741
|
+
},
|
|
8742
|
+
"immutable": true,
|
|
8743
|
+
"locationInModule": {
|
|
8744
|
+
"filename": "lib/gateway/gateway.ts",
|
|
8745
|
+
"line": 196
|
|
8746
|
+
},
|
|
8747
|
+
"name": "stage",
|
|
8748
|
+
"optional": true,
|
|
8749
|
+
"type": {
|
|
8750
|
+
"primitive": "string"
|
|
8751
|
+
}
|
|
8752
|
+
}
|
|
8753
|
+
],
|
|
8754
|
+
"symbolId": "lib/gateway/gateway:AddApiGatewayTargetOptions"
|
|
8755
|
+
},
|
|
8594
8756
|
"@aws-cdk/aws-bedrock-agentcore-alpha.AddEndpointOptions": {
|
|
8595
8757
|
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
8596
8758
|
"datatype": true,
|
|
@@ -8664,7 +8826,7 @@
|
|
|
8664
8826
|
"kind": "interface",
|
|
8665
8827
|
"locationInModule": {
|
|
8666
8828
|
"filename": "lib/gateway/gateway.ts",
|
|
8667
|
-
"line":
|
|
8829
|
+
"line": 35
|
|
8668
8830
|
},
|
|
8669
8831
|
"name": "AddLambdaTargetOptions",
|
|
8670
8832
|
"properties": [
|
|
@@ -8677,7 +8839,7 @@
|
|
|
8677
8839
|
"immutable": true,
|
|
8678
8840
|
"locationInModule": {
|
|
8679
8841
|
"filename": "lib/gateway/gateway.ts",
|
|
8680
|
-
"line":
|
|
8842
|
+
"line": 52
|
|
8681
8843
|
},
|
|
8682
8844
|
"name": "lambdaFunction",
|
|
8683
8845
|
"type": {
|
|
@@ -8693,7 +8855,7 @@
|
|
|
8693
8855
|
"immutable": true,
|
|
8694
8856
|
"locationInModule": {
|
|
8695
8857
|
"filename": "lib/gateway/gateway.ts",
|
|
8696
|
-
"line":
|
|
8858
|
+
"line": 57
|
|
8697
8859
|
},
|
|
8698
8860
|
"name": "toolSchema",
|
|
8699
8861
|
"type": {
|
|
@@ -8710,7 +8872,7 @@
|
|
|
8710
8872
|
"immutable": true,
|
|
8711
8873
|
"locationInModule": {
|
|
8712
8874
|
"filename": "lib/gateway/gateway.ts",
|
|
8713
|
-
"line":
|
|
8875
|
+
"line": 63
|
|
8714
8876
|
},
|
|
8715
8877
|
"name": "credentialProviderConfigurations",
|
|
8716
8878
|
"optional": true,
|
|
@@ -8733,7 +8895,7 @@
|
|
|
8733
8895
|
"immutable": true,
|
|
8734
8896
|
"locationInModule": {
|
|
8735
8897
|
"filename": "lib/gateway/gateway.ts",
|
|
8736
|
-
"line":
|
|
8898
|
+
"line": 47
|
|
8737
8899
|
},
|
|
8738
8900
|
"name": "description",
|
|
8739
8901
|
"optional": true,
|
|
@@ -8751,7 +8913,7 @@
|
|
|
8751
8913
|
"immutable": true,
|
|
8752
8914
|
"locationInModule": {
|
|
8753
8915
|
"filename": "lib/gateway/gateway.ts",
|
|
8754
|
-
"line":
|
|
8916
|
+
"line": 41
|
|
8755
8917
|
},
|
|
8756
8918
|
"name": "gatewayTargetName",
|
|
8757
8919
|
"optional": true,
|
|
@@ -8777,7 +8939,7 @@
|
|
|
8777
8939
|
"kind": "interface",
|
|
8778
8940
|
"locationInModule": {
|
|
8779
8941
|
"filename": "lib/gateway/gateway.ts",
|
|
8780
|
-
"line":
|
|
8942
|
+
"line": 135
|
|
8781
8943
|
},
|
|
8782
8944
|
"name": "AddMcpServerTargetOptions",
|
|
8783
8945
|
"properties": [
|
|
@@ -8791,7 +8953,7 @@
|
|
|
8791
8953
|
"immutable": true,
|
|
8792
8954
|
"locationInModule": {
|
|
8793
8955
|
"filename": "lib/gateway/gateway.ts",
|
|
8794
|
-
"line":
|
|
8956
|
+
"line": 165
|
|
8795
8957
|
},
|
|
8796
8958
|
"name": "credentialProviderConfigurations",
|
|
8797
8959
|
"type": {
|
|
@@ -8813,7 +8975,7 @@
|
|
|
8813
8975
|
"immutable": true,
|
|
8814
8976
|
"locationInModule": {
|
|
8815
8977
|
"filename": "lib/gateway/gateway.ts",
|
|
8816
|
-
"line":
|
|
8978
|
+
"line": 157
|
|
8817
8979
|
},
|
|
8818
8980
|
"name": "endpoint",
|
|
8819
8981
|
"type": {
|
|
@@ -8830,7 +8992,7 @@
|
|
|
8830
8992
|
"immutable": true,
|
|
8831
8993
|
"locationInModule": {
|
|
8832
8994
|
"filename": "lib/gateway/gateway.ts",
|
|
8833
|
-
"line":
|
|
8995
|
+
"line": 147
|
|
8834
8996
|
},
|
|
8835
8997
|
"name": "description",
|
|
8836
8998
|
"optional": true,
|
|
@@ -8848,7 +9010,7 @@
|
|
|
8848
9010
|
"immutable": true,
|
|
8849
9011
|
"locationInModule": {
|
|
8850
9012
|
"filename": "lib/gateway/gateway.ts",
|
|
8851
|
-
"line":
|
|
9013
|
+
"line": 141
|
|
8852
9014
|
},
|
|
8853
9015
|
"name": "gatewayTargetName",
|
|
8854
9016
|
"optional": true,
|
|
@@ -8874,7 +9036,7 @@
|
|
|
8874
9036
|
"kind": "interface",
|
|
8875
9037
|
"locationInModule": {
|
|
8876
9038
|
"filename": "lib/gateway/gateway.ts",
|
|
8877
|
-
"line":
|
|
9039
|
+
"line": 69
|
|
8878
9040
|
},
|
|
8879
9041
|
"name": "AddOpenApiTargetOptions",
|
|
8880
9042
|
"properties": [
|
|
@@ -8887,7 +9049,7 @@
|
|
|
8887
9049
|
"immutable": true,
|
|
8888
9050
|
"locationInModule": {
|
|
8889
9051
|
"filename": "lib/gateway/gateway.ts",
|
|
8890
|
-
"line":
|
|
9052
|
+
"line": 86
|
|
8891
9053
|
},
|
|
8892
9054
|
"name": "apiSchema",
|
|
8893
9055
|
"type": {
|
|
@@ -8904,7 +9066,7 @@
|
|
|
8904
9066
|
"immutable": true,
|
|
8905
9067
|
"locationInModule": {
|
|
8906
9068
|
"filename": "lib/gateway/gateway.ts",
|
|
8907
|
-
"line":
|
|
9069
|
+
"line": 100
|
|
8908
9070
|
},
|
|
8909
9071
|
"name": "credentialProviderConfigurations",
|
|
8910
9072
|
"optional": true,
|
|
@@ -8927,7 +9089,7 @@
|
|
|
8927
9089
|
"immutable": true,
|
|
8928
9090
|
"locationInModule": {
|
|
8929
9091
|
"filename": "lib/gateway/gateway.ts",
|
|
8930
|
-
"line":
|
|
9092
|
+
"line": 81
|
|
8931
9093
|
},
|
|
8932
9094
|
"name": "description",
|
|
8933
9095
|
"optional": true,
|
|
@@ -8945,7 +9107,7 @@
|
|
|
8945
9107
|
"immutable": true,
|
|
8946
9108
|
"locationInModule": {
|
|
8947
9109
|
"filename": "lib/gateway/gateway.ts",
|
|
8948
|
-
"line":
|
|
9110
|
+
"line": 75
|
|
8949
9111
|
},
|
|
8950
9112
|
"name": "gatewayTargetName",
|
|
8951
9113
|
"optional": true,
|
|
@@ -8964,7 +9126,7 @@
|
|
|
8964
9126
|
"immutable": true,
|
|
8965
9127
|
"locationInModule": {
|
|
8966
9128
|
"filename": "lib/gateway/gateway.ts",
|
|
8967
|
-
"line":
|
|
9129
|
+
"line": 94
|
|
8968
9130
|
},
|
|
8969
9131
|
"name": "validateOpenApiSchema",
|
|
8970
9132
|
"optional": true,
|
|
@@ -8990,7 +9152,7 @@
|
|
|
8990
9152
|
"kind": "interface",
|
|
8991
9153
|
"locationInModule": {
|
|
8992
9154
|
"filename": "lib/gateway/gateway.ts",
|
|
8993
|
-
"line":
|
|
9155
|
+
"line": 106
|
|
8994
9156
|
},
|
|
8995
9157
|
"name": "AddSmithyTargetOptions",
|
|
8996
9158
|
"properties": [
|
|
@@ -9003,7 +9165,7 @@
|
|
|
9003
9165
|
"immutable": true,
|
|
9004
9166
|
"locationInModule": {
|
|
9005
9167
|
"filename": "lib/gateway/gateway.ts",
|
|
9006
|
-
"line":
|
|
9168
|
+
"line": 123
|
|
9007
9169
|
},
|
|
9008
9170
|
"name": "smithyModel",
|
|
9009
9171
|
"type": {
|
|
@@ -9020,7 +9182,7 @@
|
|
|
9020
9182
|
"immutable": true,
|
|
9021
9183
|
"locationInModule": {
|
|
9022
9184
|
"filename": "lib/gateway/gateway.ts",
|
|
9023
|
-
"line":
|
|
9185
|
+
"line": 129
|
|
9024
9186
|
},
|
|
9025
9187
|
"name": "credentialProviderConfigurations",
|
|
9026
9188
|
"optional": true,
|
|
@@ -9043,7 +9205,7 @@
|
|
|
9043
9205
|
"immutable": true,
|
|
9044
9206
|
"locationInModule": {
|
|
9045
9207
|
"filename": "lib/gateway/gateway.ts",
|
|
9046
|
-
"line":
|
|
9208
|
+
"line": 118
|
|
9047
9209
|
},
|
|
9048
9210
|
"name": "description",
|
|
9049
9211
|
"optional": true,
|
|
@@ -9061,7 +9223,7 @@
|
|
|
9061
9223
|
"immutable": true,
|
|
9062
9224
|
"locationInModule": {
|
|
9063
9225
|
"filename": "lib/gateway/gateway.ts",
|
|
9064
|
-
"line":
|
|
9226
|
+
"line": 112
|
|
9065
9227
|
},
|
|
9066
9228
|
"name": "gatewayTargetName",
|
|
9067
9229
|
"optional": true,
|
|
@@ -9086,7 +9248,7 @@
|
|
|
9086
9248
|
"kind": "enum",
|
|
9087
9249
|
"locationInModule": {
|
|
9088
9250
|
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9089
|
-
"line":
|
|
9251
|
+
"line": 28
|
|
9090
9252
|
},
|
|
9091
9253
|
"members": [
|
|
9092
9254
|
{
|
|
@@ -9142,7 +9304,7 @@
|
|
|
9142
9304
|
"kind": "class",
|
|
9143
9305
|
"locationInModule": {
|
|
9144
9306
|
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9145
|
-
"line":
|
|
9307
|
+
"line": 71
|
|
9146
9308
|
},
|
|
9147
9309
|
"methods": [
|
|
9148
9310
|
{
|
|
@@ -9152,7 +9314,7 @@
|
|
|
9152
9314
|
},
|
|
9153
9315
|
"locationInModule": {
|
|
9154
9316
|
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9155
|
-
"line":
|
|
9317
|
+
"line": 84
|
|
9156
9318
|
},
|
|
9157
9319
|
"name": "fromAsset",
|
|
9158
9320
|
"parameters": [
|
|
@@ -9183,6 +9345,34 @@
|
|
|
9183
9345
|
},
|
|
9184
9346
|
"static": true
|
|
9185
9347
|
},
|
|
9348
|
+
{
|
|
9349
|
+
"docs": {
|
|
9350
|
+
"stability": "experimental",
|
|
9351
|
+
"summary": "Reference an agent runtime artifact that's constructed from local code assets uploaded to a CDK-managed S3 bucket."
|
|
9352
|
+
},
|
|
9353
|
+
"locationInModule": {
|
|
9354
|
+
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9355
|
+
"line": 102
|
|
9356
|
+
},
|
|
9357
|
+
"name": "fromCodeAsset",
|
|
9358
|
+
"parameters": [
|
|
9359
|
+
{
|
|
9360
|
+
"docs": {
|
|
9361
|
+
"summary": "The options for configuring the code asset."
|
|
9362
|
+
},
|
|
9363
|
+
"name": "options",
|
|
9364
|
+
"type": {
|
|
9365
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.CodeAssetOptions"
|
|
9366
|
+
}
|
|
9367
|
+
}
|
|
9368
|
+
],
|
|
9369
|
+
"returns": {
|
|
9370
|
+
"type": {
|
|
9371
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.AgentRuntimeArtifact"
|
|
9372
|
+
}
|
|
9373
|
+
},
|
|
9374
|
+
"static": true
|
|
9375
|
+
},
|
|
9186
9376
|
{
|
|
9187
9377
|
"docs": {
|
|
9188
9378
|
"stability": "experimental",
|
|
@@ -9190,7 +9380,7 @@
|
|
|
9190
9380
|
},
|
|
9191
9381
|
"locationInModule": {
|
|
9192
9382
|
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9193
|
-
"line":
|
|
9383
|
+
"line": 75
|
|
9194
9384
|
},
|
|
9195
9385
|
"name": "fromEcrRepository",
|
|
9196
9386
|
"parameters": [
|
|
@@ -9223,7 +9413,7 @@
|
|
|
9223
9413
|
},
|
|
9224
9414
|
"locationInModule": {
|
|
9225
9415
|
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9226
|
-
"line":
|
|
9416
|
+
"line": 116
|
|
9227
9417
|
},
|
|
9228
9418
|
"name": "fromImageUri",
|
|
9229
9419
|
"parameters": [
|
|
@@ -9251,7 +9441,7 @@
|
|
|
9251
9441
|
},
|
|
9252
9442
|
"locationInModule": {
|
|
9253
9443
|
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9254
|
-
"line":
|
|
9444
|
+
"line": 94
|
|
9255
9445
|
},
|
|
9256
9446
|
"name": "fromS3",
|
|
9257
9447
|
"parameters": [
|
|
@@ -9304,7 +9494,7 @@
|
|
|
9304
9494
|
},
|
|
9305
9495
|
"locationInModule": {
|
|
9306
9496
|
"filename": "lib/runtime/runtime-artifact.ts",
|
|
9307
|
-
"line":
|
|
9497
|
+
"line": 123
|
|
9308
9498
|
},
|
|
9309
9499
|
"name": "bind",
|
|
9310
9500
|
"parameters": [
|
|
@@ -9525,62 +9715,641 @@
|
|
|
9525
9715
|
],
|
|
9526
9716
|
"symbolId": "lib/runtime/runtime-base:AgentRuntimeAttributes"
|
|
9527
9717
|
},
|
|
9528
|
-
"@aws-cdk/aws-bedrock-agentcore-alpha.
|
|
9718
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayHttpMethod": {
|
|
9529
9719
|
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
9530
|
-
"datatype": true,
|
|
9531
9720
|
"docs": {
|
|
9532
9721
|
"stability": "experimental",
|
|
9533
|
-
"summary": "
|
|
9534
|
-
"example": "const gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\
|
|
9722
|
+
"summary": "HTTP methods supported by API Gateway.",
|
|
9723
|
+
"example": "const gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst api = new apigateway.RestApi(this, 'MyApi', {\n restApiName: 'my-api',\n});\n\n// Uses IAM authorization for outbound auth by default\nconst apiGatewayTarget = gateway.addApiGatewayTarget(\"MyApiGatewayTarget\", {\n restApi: api,\n apiGatewayToolConfiguration: {\n toolFilters: [\n {\n filterPath: \"/pets/*\",\n methods: [agentcore.ApiGatewayHttpMethod.GET],\n },\n ],\n },\n});",
|
|
9535
9724
|
"custom": {
|
|
9536
|
-
"exampleMetadata": "infused"
|
|
9725
|
+
"exampleMetadata": "fixture=default infused"
|
|
9537
9726
|
}
|
|
9538
9727
|
},
|
|
9539
|
-
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.
|
|
9540
|
-
"kind": "
|
|
9728
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayHttpMethod",
|
|
9729
|
+
"kind": "enum",
|
|
9541
9730
|
"locationInModule": {
|
|
9542
|
-
"filename": "lib/gateway/
|
|
9543
|
-
"line":
|
|
9731
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9732
|
+
"line": 419
|
|
9544
9733
|
},
|
|
9545
|
-
"
|
|
9546
|
-
"properties": [
|
|
9734
|
+
"members": [
|
|
9547
9735
|
{
|
|
9548
|
-
"abstract": true,
|
|
9549
9736
|
"docs": {
|
|
9550
|
-
"default": "- 'Authorization' for HEADER, 'api_key' for QUERY_PARAMETER",
|
|
9551
|
-
"remarks": "This parameter name is used when sending the API key to the target endpoint.\n\nLength Constraints: Minimum length of 1. Maximum length of 64.",
|
|
9552
9737
|
"stability": "experimental",
|
|
9553
|
-
"summary": "
|
|
9738
|
+
"summary": "GET method."
|
|
9554
9739
|
},
|
|
9555
|
-
"
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9740
|
+
"name": "GET"
|
|
9741
|
+
},
|
|
9742
|
+
{
|
|
9743
|
+
"docs": {
|
|
9744
|
+
"stability": "experimental",
|
|
9745
|
+
"summary": "POST method."
|
|
9559
9746
|
},
|
|
9560
|
-
"name": "
|
|
9561
|
-
"optional": true,
|
|
9562
|
-
"type": {
|
|
9563
|
-
"primitive": "string"
|
|
9564
|
-
}
|
|
9747
|
+
"name": "POST"
|
|
9565
9748
|
},
|
|
9566
9749
|
{
|
|
9567
|
-
"abstract": true,
|
|
9568
9750
|
"docs": {
|
|
9569
|
-
"default": "- 'Bearer ' for HEADER, no prefix for QUERY_PARAMETER",
|
|
9570
|
-
"remarks": "This prefix is added to the API key when sending it to the target endpoint.\n\nLength Constraints: Minimum length of 1. Maximum length of 64.",
|
|
9571
9751
|
"stability": "experimental",
|
|
9572
|
-
"summary": "
|
|
9752
|
+
"summary": "PUT method."
|
|
9573
9753
|
},
|
|
9574
|
-
"
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9754
|
+
"name": "PUT"
|
|
9755
|
+
},
|
|
9756
|
+
{
|
|
9757
|
+
"docs": {
|
|
9758
|
+
"stability": "experimental",
|
|
9759
|
+
"summary": "DELETE method."
|
|
9578
9760
|
},
|
|
9579
|
-
"name": "
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9761
|
+
"name": "DELETE"
|
|
9762
|
+
},
|
|
9763
|
+
{
|
|
9764
|
+
"docs": {
|
|
9765
|
+
"stability": "experimental",
|
|
9766
|
+
"summary": "PATCH method."
|
|
9767
|
+
},
|
|
9768
|
+
"name": "PATCH"
|
|
9769
|
+
},
|
|
9770
|
+
{
|
|
9771
|
+
"docs": {
|
|
9772
|
+
"stability": "experimental",
|
|
9773
|
+
"summary": "HEAD method."
|
|
9774
|
+
},
|
|
9775
|
+
"name": "HEAD"
|
|
9776
|
+
},
|
|
9777
|
+
{
|
|
9778
|
+
"docs": {
|
|
9779
|
+
"stability": "experimental",
|
|
9780
|
+
"summary": "OPTIONS method."
|
|
9781
|
+
},
|
|
9782
|
+
"name": "OPTIONS"
|
|
9783
|
+
}
|
|
9784
|
+
],
|
|
9785
|
+
"name": "ApiGatewayHttpMethod",
|
|
9786
|
+
"symbolId": "lib/gateway/targets/target-configuration:ApiGatewayHttpMethod"
|
|
9787
|
+
},
|
|
9788
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayTargetConfiguration": {
|
|
9789
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
9790
|
+
"base": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
9791
|
+
"docs": {
|
|
9792
|
+
"remarks": "This configuration connects your gateway to an Amazon API Gateway REST API stage.\nThe gateway translates incoming MCP requests into HTTP requests to your REST API\nand handles response formatting.\n\nKey considerations:\n- API must be in the same account and region as the gateway\n- Only REST APIs are supported (no HTTP or WebSocket APIs)\n- API must use a public endpoint type\n- Methods with both AWS_IAM authorization and API key requirements are not supported\n- Proxy resources (e.g., `/pets/{proxy+}`) are not supported",
|
|
9793
|
+
"stability": "experimental",
|
|
9794
|
+
"summary": "Configuration for API Gateway-based MCP targets.",
|
|
9795
|
+
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';\nimport { aws_apigateway as apigateway } from 'aws-cdk-lib';\n\ndeclare const restApi: apigateway.RestApi;\nconst apiGatewayTargetConfiguration = new bedrock_agentcore_alpha.ApiGatewayTargetConfiguration({\n apiGatewayToolConfiguration: {\n toolFilters: [{\n filterPath: 'filterPath',\n methods: [bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET],\n }],\n\n // the properties below are optional\n toolOverrides: [{\n method: bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET,\n name: 'name',\n path: 'path',\n\n // the properties below are optional\n description: 'description',\n }],\n },\n restApi: restApi,\n\n // the properties below are optional\n metadataConfiguration: {\n allowedQueryParameters: ['allowedQueryParameters'],\n allowedRequestHeaders: ['allowedRequestHeaders'],\n allowedResponseHeaders: ['allowedResponseHeaders'],\n },\n stage: 'stage',\n});",
|
|
9796
|
+
"custom": {
|
|
9797
|
+
"exampleMetadata": "fixture=_generated"
|
|
9798
|
+
}
|
|
9799
|
+
},
|
|
9800
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayTargetConfiguration",
|
|
9801
|
+
"initializer": {
|
|
9802
|
+
"docs": {
|
|
9803
|
+
"stability": "experimental"
|
|
9804
|
+
},
|
|
9805
|
+
"locationInModule": {
|
|
9806
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9807
|
+
"line": 638
|
|
9808
|
+
},
|
|
9809
|
+
"parameters": [
|
|
9810
|
+
{
|
|
9811
|
+
"name": "props",
|
|
9812
|
+
"type": {
|
|
9813
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayTargetConfigurationProps"
|
|
9814
|
+
}
|
|
9815
|
+
}
|
|
9816
|
+
]
|
|
9817
|
+
},
|
|
9818
|
+
"kind": "class",
|
|
9819
|
+
"locationInModule": {
|
|
9820
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9821
|
+
"line": 600
|
|
9822
|
+
},
|
|
9823
|
+
"methods": [
|
|
9824
|
+
{
|
|
9825
|
+
"docs": {
|
|
9826
|
+
"returns": "A new ApiGatewayTargetConfiguration instance",
|
|
9827
|
+
"stability": "experimental",
|
|
9828
|
+
"summary": "Create an API Gateway target configuration."
|
|
9829
|
+
},
|
|
9830
|
+
"locationInModule": {
|
|
9831
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9832
|
+
"line": 607
|
|
9833
|
+
},
|
|
9834
|
+
"name": "create",
|
|
9835
|
+
"parameters": [
|
|
9836
|
+
{
|
|
9837
|
+
"docs": {
|
|
9838
|
+
"summary": "The configuration properties."
|
|
9839
|
+
},
|
|
9840
|
+
"name": "props",
|
|
9841
|
+
"type": {
|
|
9842
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayTargetConfigurationProps"
|
|
9843
|
+
}
|
|
9844
|
+
}
|
|
9845
|
+
],
|
|
9846
|
+
"returns": {
|
|
9847
|
+
"type": {
|
|
9848
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayTargetConfiguration"
|
|
9849
|
+
}
|
|
9850
|
+
},
|
|
9851
|
+
"static": true
|
|
9852
|
+
},
|
|
9853
|
+
{
|
|
9854
|
+
"docs": {
|
|
9855
|
+
"stability": "experimental",
|
|
9856
|
+
"summary": "Binds this configuration to a construct scope Sets up necessary permissions for the gateway to access the API Gateway."
|
|
9857
|
+
},
|
|
9858
|
+
"locationInModule": {
|
|
9859
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9860
|
+
"line": 656
|
|
9861
|
+
},
|
|
9862
|
+
"name": "bind",
|
|
9863
|
+
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
9864
|
+
"parameters": [
|
|
9865
|
+
{
|
|
9866
|
+
"docs": {
|
|
9867
|
+
"summary": "The construct scope."
|
|
9868
|
+
},
|
|
9869
|
+
"name": "_scope",
|
|
9870
|
+
"type": {
|
|
9871
|
+
"fqn": "constructs.Construct"
|
|
9872
|
+
}
|
|
9873
|
+
},
|
|
9874
|
+
{
|
|
9875
|
+
"docs": {
|
|
9876
|
+
"summary": "The gateway that will use this target."
|
|
9877
|
+
},
|
|
9878
|
+
"name": "gateway",
|
|
9879
|
+
"type": {
|
|
9880
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.IGateway"
|
|
9881
|
+
}
|
|
9882
|
+
}
|
|
9883
|
+
],
|
|
9884
|
+
"returns": {
|
|
9885
|
+
"type": {
|
|
9886
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.TargetConfigurationConfig"
|
|
9887
|
+
}
|
|
9888
|
+
}
|
|
9889
|
+
},
|
|
9890
|
+
{
|
|
9891
|
+
"docs": {
|
|
9892
|
+
"stability": "experimental",
|
|
9893
|
+
"summary": "Renders the MCP-specific configuration."
|
|
9894
|
+
},
|
|
9895
|
+
"locationInModule": {
|
|
9896
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9897
|
+
"line": 677
|
|
9898
|
+
},
|
|
9899
|
+
"name": "renderMcpConfiguration",
|
|
9900
|
+
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
9901
|
+
"protected": true,
|
|
9902
|
+
"returns": {
|
|
9903
|
+
"type": {
|
|
9904
|
+
"primitive": "any"
|
|
9905
|
+
}
|
|
9906
|
+
}
|
|
9907
|
+
}
|
|
9908
|
+
],
|
|
9909
|
+
"name": "ApiGatewayTargetConfiguration",
|
|
9910
|
+
"properties": [
|
|
9911
|
+
{
|
|
9912
|
+
"docs": {
|
|
9913
|
+
"stability": "experimental",
|
|
9914
|
+
"summary": "Tool configuration for the API Gateway target."
|
|
9915
|
+
},
|
|
9916
|
+
"immutable": true,
|
|
9917
|
+
"locationInModule": {
|
|
9918
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9919
|
+
"line": 631
|
|
9920
|
+
},
|
|
9921
|
+
"name": "apiGatewayToolConfiguration",
|
|
9922
|
+
"type": {
|
|
9923
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolConfiguration"
|
|
9924
|
+
}
|
|
9925
|
+
},
|
|
9926
|
+
{
|
|
9927
|
+
"docs": {
|
|
9928
|
+
"stability": "experimental",
|
|
9929
|
+
"summary": "The ID of the REST API."
|
|
9930
|
+
},
|
|
9931
|
+
"immutable": true,
|
|
9932
|
+
"locationInModule": {
|
|
9933
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9934
|
+
"line": 621
|
|
9935
|
+
},
|
|
9936
|
+
"name": "restApiId",
|
|
9937
|
+
"type": {
|
|
9938
|
+
"primitive": "string"
|
|
9939
|
+
}
|
|
9940
|
+
},
|
|
9941
|
+
{
|
|
9942
|
+
"docs": {
|
|
9943
|
+
"stability": "experimental",
|
|
9944
|
+
"summary": "The stage name of the REST API."
|
|
9945
|
+
},
|
|
9946
|
+
"immutable": true,
|
|
9947
|
+
"locationInModule": {
|
|
9948
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9949
|
+
"line": 626
|
|
9950
|
+
},
|
|
9951
|
+
"name": "stage",
|
|
9952
|
+
"type": {
|
|
9953
|
+
"primitive": "string"
|
|
9954
|
+
}
|
|
9955
|
+
},
|
|
9956
|
+
{
|
|
9957
|
+
"docs": {
|
|
9958
|
+
"stability": "experimental",
|
|
9959
|
+
"summary": "The target type."
|
|
9960
|
+
},
|
|
9961
|
+
"immutable": true,
|
|
9962
|
+
"locationInModule": {
|
|
9963
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9964
|
+
"line": 611
|
|
9965
|
+
},
|
|
9966
|
+
"name": "targetType",
|
|
9967
|
+
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
9968
|
+
"type": {
|
|
9969
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetType"
|
|
9970
|
+
}
|
|
9971
|
+
},
|
|
9972
|
+
{
|
|
9973
|
+
"docs": {
|
|
9974
|
+
"stability": "experimental",
|
|
9975
|
+
"summary": "Metadata configuration for the API Gateway target."
|
|
9976
|
+
},
|
|
9977
|
+
"immutable": true,
|
|
9978
|
+
"locationInModule": {
|
|
9979
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
9980
|
+
"line": 636
|
|
9981
|
+
},
|
|
9982
|
+
"name": "metadataConfiguration",
|
|
9983
|
+
"optional": true,
|
|
9984
|
+
"type": {
|
|
9985
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.MetadataConfiguration"
|
|
9986
|
+
}
|
|
9987
|
+
}
|
|
9988
|
+
],
|
|
9989
|
+
"symbolId": "lib/gateway/targets/target-configuration:ApiGatewayTargetConfiguration"
|
|
9990
|
+
},
|
|
9991
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayTargetConfigurationProps": {
|
|
9992
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
9993
|
+
"datatype": true,
|
|
9994
|
+
"docs": {
|
|
9995
|
+
"stability": "experimental",
|
|
9996
|
+
"summary": "Properties for creating an API Gateway target configuration.",
|
|
9997
|
+
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';\nimport { aws_apigateway as apigateway } from 'aws-cdk-lib';\n\ndeclare const restApi: apigateway.RestApi;\nconst apiGatewayTargetConfigurationProps: bedrock_agentcore_alpha.ApiGatewayTargetConfigurationProps = {\n apiGatewayToolConfiguration: {\n toolFilters: [{\n filterPath: 'filterPath',\n methods: [bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET],\n }],\n\n // the properties below are optional\n toolOverrides: [{\n method: bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET,\n name: 'name',\n path: 'path',\n\n // the properties below are optional\n description: 'description',\n }],\n },\n restApi: restApi,\n\n // the properties below are optional\n metadataConfiguration: {\n allowedQueryParameters: ['allowedQueryParameters'],\n allowedRequestHeaders: ['allowedRequestHeaders'],\n allowedResponseHeaders: ['allowedResponseHeaders'],\n },\n stage: 'stage',\n};",
|
|
9998
|
+
"custom": {
|
|
9999
|
+
"exampleMetadata": "fixture=_generated"
|
|
10000
|
+
}
|
|
10001
|
+
},
|
|
10002
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayTargetConfigurationProps",
|
|
10003
|
+
"kind": "interface",
|
|
10004
|
+
"locationInModule": {
|
|
10005
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10006
|
+
"line": 560
|
|
10007
|
+
},
|
|
10008
|
+
"name": "ApiGatewayTargetConfigurationProps",
|
|
10009
|
+
"properties": [
|
|
10010
|
+
{
|
|
10011
|
+
"abstract": true,
|
|
10012
|
+
"docs": {
|
|
10013
|
+
"stability": "experimental",
|
|
10014
|
+
"summary": "Tool configuration defining which operations to expose."
|
|
10015
|
+
},
|
|
10016
|
+
"immutable": true,
|
|
10017
|
+
"locationInModule": {
|
|
10018
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10019
|
+
"line": 576
|
|
10020
|
+
},
|
|
10021
|
+
"name": "apiGatewayToolConfiguration",
|
|
10022
|
+
"type": {
|
|
10023
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolConfiguration"
|
|
10024
|
+
}
|
|
10025
|
+
},
|
|
10026
|
+
{
|
|
10027
|
+
"abstract": true,
|
|
10028
|
+
"docs": {
|
|
10029
|
+
"stability": "experimental",
|
|
10030
|
+
"summary": "The REST API to integrate with Must be in the same account and region as the gateway."
|
|
10031
|
+
},
|
|
10032
|
+
"immutable": true,
|
|
10033
|
+
"locationInModule": {
|
|
10034
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10035
|
+
"line": 565
|
|
10036
|
+
},
|
|
10037
|
+
"name": "restApi",
|
|
10038
|
+
"type": {
|
|
10039
|
+
"fqn": "aws-cdk-lib.aws_apigateway.IRestApi"
|
|
10040
|
+
}
|
|
10041
|
+
},
|
|
10042
|
+
{
|
|
10043
|
+
"abstract": true,
|
|
10044
|
+
"docs": {
|
|
10045
|
+
"default": "- No metadata configuration",
|
|
10046
|
+
"stability": "experimental",
|
|
10047
|
+
"summary": "Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters."
|
|
10048
|
+
},
|
|
10049
|
+
"immutable": true,
|
|
10050
|
+
"locationInModule": {
|
|
10051
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10052
|
+
"line": 583
|
|
10053
|
+
},
|
|
10054
|
+
"name": "metadataConfiguration",
|
|
10055
|
+
"optional": true,
|
|
10056
|
+
"type": {
|
|
10057
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.MetadataConfiguration"
|
|
10058
|
+
}
|
|
10059
|
+
},
|
|
10060
|
+
{
|
|
10061
|
+
"abstract": true,
|
|
10062
|
+
"docs": {
|
|
10063
|
+
"default": "- Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName)",
|
|
10064
|
+
"stability": "experimental",
|
|
10065
|
+
"summary": "The stage name of the REST API."
|
|
10066
|
+
},
|
|
10067
|
+
"immutable": true,
|
|
10068
|
+
"locationInModule": {
|
|
10069
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10070
|
+
"line": 571
|
|
10071
|
+
},
|
|
10072
|
+
"name": "stage",
|
|
10073
|
+
"optional": true,
|
|
10074
|
+
"type": {
|
|
10075
|
+
"primitive": "string"
|
|
10076
|
+
}
|
|
10077
|
+
}
|
|
10078
|
+
],
|
|
10079
|
+
"symbolId": "lib/gateway/targets/target-configuration:ApiGatewayTargetConfigurationProps"
|
|
10080
|
+
},
|
|
10081
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolConfiguration": {
|
|
10082
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
10083
|
+
"datatype": true,
|
|
10084
|
+
"docs": {
|
|
10085
|
+
"remarks": "The API Gateway tool configuration defines which operations from your REST API\nare exposed as tools. It requires a list of tool filters to select operations\nto expose, and optionally accepts tool overrides to customize tool metadata.",
|
|
10086
|
+
"stability": "experimental",
|
|
10087
|
+
"summary": "Configuration for API Gateway tools.",
|
|
10088
|
+
"example": "const gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst api = new apigateway.RestApi(this, 'MyApi', {\n restApiName: 'my-api',\n});\n\n// Uses IAM authorization for outbound auth by default\nconst apiGatewayTarget = gateway.addApiGatewayTarget(\"MyApiGatewayTarget\", {\n restApi: api,\n apiGatewayToolConfiguration: {\n toolFilters: [\n {\n filterPath: \"/pets/*\",\n methods: [agentcore.ApiGatewayHttpMethod.GET],\n },\n ],\n },\n});",
|
|
10089
|
+
"custom": {
|
|
10090
|
+
"exampleMetadata": "fixture=default infused"
|
|
10091
|
+
}
|
|
10092
|
+
},
|
|
10093
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolConfiguration",
|
|
10094
|
+
"kind": "interface",
|
|
10095
|
+
"locationInModule": {
|
|
10096
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10097
|
+
"line": 542
|
|
10098
|
+
},
|
|
10099
|
+
"name": "ApiGatewayToolConfiguration",
|
|
10100
|
+
"properties": [
|
|
10101
|
+
{
|
|
10102
|
+
"abstract": true,
|
|
10103
|
+
"docs": {
|
|
10104
|
+
"stability": "experimental",
|
|
10105
|
+
"summary": "List of tool filters to select operations At least one filter is required."
|
|
10106
|
+
},
|
|
10107
|
+
"immutable": true,
|
|
10108
|
+
"locationInModule": {
|
|
10109
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10110
|
+
"line": 547
|
|
10111
|
+
},
|
|
10112
|
+
"name": "toolFilters",
|
|
10113
|
+
"type": {
|
|
10114
|
+
"collection": {
|
|
10115
|
+
"elementtype": {
|
|
10116
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolFilter"
|
|
10117
|
+
},
|
|
10118
|
+
"kind": "array"
|
|
10119
|
+
}
|
|
10120
|
+
}
|
|
10121
|
+
},
|
|
10122
|
+
{
|
|
10123
|
+
"abstract": true,
|
|
10124
|
+
"docs": {
|
|
10125
|
+
"default": "- No tool overrides",
|
|
10126
|
+
"stability": "experimental",
|
|
10127
|
+
"summary": "Optional list of tool overrides to customize tool metadata Each override must correspond to an operation selected by the filters."
|
|
10128
|
+
},
|
|
10129
|
+
"immutable": true,
|
|
10130
|
+
"locationInModule": {
|
|
10131
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10132
|
+
"line": 554
|
|
10133
|
+
},
|
|
10134
|
+
"name": "toolOverrides",
|
|
10135
|
+
"optional": true,
|
|
10136
|
+
"type": {
|
|
10137
|
+
"collection": {
|
|
10138
|
+
"elementtype": {
|
|
10139
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolOverride"
|
|
10140
|
+
},
|
|
10141
|
+
"kind": "array"
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10144
|
+
}
|
|
10145
|
+
],
|
|
10146
|
+
"symbolId": "lib/gateway/targets/target-configuration:ApiGatewayToolConfiguration"
|
|
10147
|
+
},
|
|
10148
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolFilter": {
|
|
10149
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
10150
|
+
"datatype": true,
|
|
10151
|
+
"docs": {
|
|
10152
|
+
"remarks": "Tool filters allow you to select REST API operations using path and method combinations.\nEach filter supports two path matching strategies:\n- **Explicit paths**: Matches a single specific path, such as `/pets/{petId}`\n- **Wildcard paths**: Matches all paths starting with the specified prefix, such as `/pets/*`",
|
|
10153
|
+
"stability": "experimental",
|
|
10154
|
+
"summary": "Configuration for filtering API Gateway tools.",
|
|
10155
|
+
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';\nconst apiGatewayToolFilter: bedrock_agentcore_alpha.ApiGatewayToolFilter = {\n filterPath: 'filterPath',\n methods: [bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET],\n};",
|
|
10156
|
+
"custom": {
|
|
10157
|
+
"exampleMetadata": "fixture=_generated"
|
|
10158
|
+
}
|
|
10159
|
+
},
|
|
10160
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolFilter",
|
|
10161
|
+
"kind": "interface",
|
|
10162
|
+
"locationInModule": {
|
|
10163
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10164
|
+
"line": 444
|
|
10165
|
+
},
|
|
10166
|
+
"name": "ApiGatewayToolFilter",
|
|
10167
|
+
"properties": [
|
|
10168
|
+
{
|
|
10169
|
+
"abstract": true,
|
|
10170
|
+
"docs": {
|
|
10171
|
+
"stability": "experimental",
|
|
10172
|
+
"summary": "The resource path to filter Can be an explicit path (e.g., `/pets/{petId}`) or a wildcard path (e.g., `/pets/*`) Must start with a forward slash."
|
|
10173
|
+
},
|
|
10174
|
+
"immutable": true,
|
|
10175
|
+
"locationInModule": {
|
|
10176
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10177
|
+
"line": 450
|
|
10178
|
+
},
|
|
10179
|
+
"name": "filterPath",
|
|
10180
|
+
"type": {
|
|
10181
|
+
"primitive": "string"
|
|
10182
|
+
}
|
|
10183
|
+
},
|
|
10184
|
+
{
|
|
10185
|
+
"abstract": true,
|
|
10186
|
+
"docs": {
|
|
10187
|
+
"stability": "experimental",
|
|
10188
|
+
"summary": "List of HTTP methods to include for this path Each filter specifies both a path and a list of HTTP methods Multiple filters can overlap and duplicates are automatically de-duplicated."
|
|
10189
|
+
},
|
|
10190
|
+
"immutable": true,
|
|
10191
|
+
"locationInModule": {
|
|
10192
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10193
|
+
"line": 457
|
|
10194
|
+
},
|
|
10195
|
+
"name": "methods",
|
|
10196
|
+
"type": {
|
|
10197
|
+
"collection": {
|
|
10198
|
+
"elementtype": {
|
|
10199
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayHttpMethod"
|
|
10200
|
+
},
|
|
10201
|
+
"kind": "array"
|
|
10202
|
+
}
|
|
10203
|
+
}
|
|
10204
|
+
}
|
|
10205
|
+
],
|
|
10206
|
+
"symbolId": "lib/gateway/targets/target-configuration:ApiGatewayToolFilter"
|
|
10207
|
+
},
|
|
10208
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolOverride": {
|
|
10209
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
10210
|
+
"datatype": true,
|
|
10211
|
+
"docs": {
|
|
10212
|
+
"remarks": "Tool overrides allow you to customize the tool name or description for specific operations\nafter filtering. Each override must specify an explicit path and a single HTTP method.\nThe override must match an operation that exists in your API and must correspond to one\nof the operations resolved by your filters.",
|
|
10213
|
+
"stability": "experimental",
|
|
10214
|
+
"summary": "Configuration for overriding API Gateway tool metadata.",
|
|
10215
|
+
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';\nconst apiGatewayToolOverride: bedrock_agentcore_alpha.ApiGatewayToolOverride = {\n method: bedrock_agentcore_alpha.ApiGatewayHttpMethod.GET,\n name: 'name',\n path: 'path',\n\n // the properties below are optional\n description: 'description',\n};",
|
|
10216
|
+
"custom": {
|
|
10217
|
+
"exampleMetadata": "fixture=_generated"
|
|
10218
|
+
}
|
|
10219
|
+
},
|
|
10220
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolOverride",
|
|
10221
|
+
"kind": "interface",
|
|
10222
|
+
"locationInModule": {
|
|
10223
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10224
|
+
"line": 468
|
|
10225
|
+
},
|
|
10226
|
+
"name": "ApiGatewayToolOverride",
|
|
10227
|
+
"properties": [
|
|
10228
|
+
{
|
|
10229
|
+
"abstract": true,
|
|
10230
|
+
"docs": {
|
|
10231
|
+
"stability": "experimental",
|
|
10232
|
+
"summary": "The HTTP method for this override Must be a single method (no wildcards)."
|
|
10233
|
+
},
|
|
10234
|
+
"immutable": true,
|
|
10235
|
+
"locationInModule": {
|
|
10236
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10237
|
+
"line": 479
|
|
10238
|
+
},
|
|
10239
|
+
"name": "method",
|
|
10240
|
+
"type": {
|
|
10241
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayHttpMethod"
|
|
10242
|
+
}
|
|
10243
|
+
},
|
|
10244
|
+
{
|
|
10245
|
+
"abstract": true,
|
|
10246
|
+
"docs": {
|
|
10247
|
+
"stability": "experimental",
|
|
10248
|
+
"summary": "The custom tool name If not provided, the operationId from the OpenAPI definition will be used."
|
|
10249
|
+
},
|
|
10250
|
+
"immutable": true,
|
|
10251
|
+
"locationInModule": {
|
|
10252
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10253
|
+
"line": 485
|
|
10254
|
+
},
|
|
10255
|
+
"name": "name",
|
|
10256
|
+
"type": {
|
|
10257
|
+
"primitive": "string"
|
|
10258
|
+
}
|
|
10259
|
+
},
|
|
10260
|
+
{
|
|
10261
|
+
"abstract": true,
|
|
10262
|
+
"docs": {
|
|
10263
|
+
"stability": "experimental",
|
|
10264
|
+
"summary": "The explicit resource path (no wildcards) Must match an operation that exists in your API."
|
|
10265
|
+
},
|
|
10266
|
+
"immutable": true,
|
|
10267
|
+
"locationInModule": {
|
|
10268
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10269
|
+
"line": 473
|
|
10270
|
+
},
|
|
10271
|
+
"name": "path",
|
|
10272
|
+
"type": {
|
|
10273
|
+
"primitive": "string"
|
|
10274
|
+
}
|
|
10275
|
+
},
|
|
10276
|
+
{
|
|
10277
|
+
"abstract": true,
|
|
10278
|
+
"docs": {
|
|
10279
|
+
"default": "- No custom description",
|
|
10280
|
+
"stability": "experimental",
|
|
10281
|
+
"summary": "Optional custom description for the tool."
|
|
10282
|
+
},
|
|
10283
|
+
"immutable": true,
|
|
10284
|
+
"locationInModule": {
|
|
10285
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
10286
|
+
"line": 491
|
|
10287
|
+
},
|
|
10288
|
+
"name": "description",
|
|
10289
|
+
"optional": true,
|
|
10290
|
+
"type": {
|
|
10291
|
+
"primitive": "string"
|
|
10292
|
+
}
|
|
10293
|
+
}
|
|
10294
|
+
],
|
|
10295
|
+
"symbolId": "lib/gateway/targets/target-configuration:ApiGatewayToolOverride"
|
|
10296
|
+
},
|
|
10297
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.ApiKeyAdditionalConfiguration": {
|
|
10298
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
10299
|
+
"datatype": true,
|
|
10300
|
+
"docs": {
|
|
10301
|
+
"stability": "experimental",
|
|
10302
|
+
"summary": "API Key additional configuration.",
|
|
10303
|
+
"example": "const gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\n// These ARNs are returned when creating the API key credential provider via Console or API\nconst apiKeyProviderArn = \"arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/apikeycredentialprovider/my-apikey\"\nconst apiKeySecretArn = \"arn:aws:secretsmanager:us-east-1:123456789012:secret:my-apikey-secret-abc123\"\n\nconst bucket = s3.Bucket.fromBucketName(this, \"ExistingBucket\", \"my-schema-bucket\");\nconst s3mySchema = agentcore.ApiSchema.fromS3File(bucket, \"schemas/myschema.yaml\");\n\n// Add an OpenAPI target directly to the gateway\nconst target = gateway.addOpenApiTarget(\"MyTarget\", {\n gatewayTargetName: \"my-api-target\",\n description: \"Target for external API integration\",\n apiSchema: s3mySchema,\n credentialProviderConfigurations: [\n agentcore.GatewayCredentialProvider.fromApiKeyIdentityArn({\n providerArn: apiKeyProviderArn,\n secretArn: apiKeySecretArn,\n credentialLocation: agentcore.ApiKeyCredentialLocation.header({\n credentialParameterName: \"X-API-Key\",\n }),\n }),\n ],\n});\n\n// This make sure your s3 bucket is available before target\ntarget.node.addDependency(bucket);",
|
|
10304
|
+
"custom": {
|
|
10305
|
+
"exampleMetadata": "infused"
|
|
10306
|
+
}
|
|
10307
|
+
},
|
|
10308
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiKeyAdditionalConfiguration",
|
|
10309
|
+
"kind": "interface",
|
|
10310
|
+
"locationInModule": {
|
|
10311
|
+
"filename": "lib/gateway/outbound-auth/api-key.ts",
|
|
10312
|
+
"line": 13
|
|
10313
|
+
},
|
|
10314
|
+
"name": "ApiKeyAdditionalConfiguration",
|
|
10315
|
+
"properties": [
|
|
10316
|
+
{
|
|
10317
|
+
"abstract": true,
|
|
10318
|
+
"docs": {
|
|
10319
|
+
"default": "- 'Authorization' for HEADER, 'api_key' for QUERY_PARAMETER",
|
|
10320
|
+
"remarks": "This parameter name is used when sending the API key to the target endpoint.\n\nLength Constraints: Minimum length of 1. Maximum length of 64.",
|
|
10321
|
+
"stability": "experimental",
|
|
10322
|
+
"summary": "The name of the credential parameter for the API key."
|
|
10323
|
+
},
|
|
10324
|
+
"immutable": true,
|
|
10325
|
+
"locationInModule": {
|
|
10326
|
+
"filename": "lib/gateway/outbound-auth/api-key.ts",
|
|
10327
|
+
"line": 22
|
|
10328
|
+
},
|
|
10329
|
+
"name": "credentialParameterName",
|
|
10330
|
+
"optional": true,
|
|
10331
|
+
"type": {
|
|
10332
|
+
"primitive": "string"
|
|
10333
|
+
}
|
|
10334
|
+
},
|
|
10335
|
+
{
|
|
10336
|
+
"abstract": true,
|
|
10337
|
+
"docs": {
|
|
10338
|
+
"default": "- 'Bearer ' for HEADER, no prefix for QUERY_PARAMETER",
|
|
10339
|
+
"remarks": "This prefix is added to the API key when sending it to the target endpoint.\n\nLength Constraints: Minimum length of 1. Maximum length of 64.",
|
|
10340
|
+
"stability": "experimental",
|
|
10341
|
+
"summary": "The prefix for the API key credential."
|
|
10342
|
+
},
|
|
10343
|
+
"immutable": true,
|
|
10344
|
+
"locationInModule": {
|
|
10345
|
+
"filename": "lib/gateway/outbound-auth/api-key.ts",
|
|
10346
|
+
"line": 31
|
|
10347
|
+
},
|
|
10348
|
+
"name": "credentialPrefix",
|
|
10349
|
+
"optional": true,
|
|
10350
|
+
"type": {
|
|
10351
|
+
"primitive": "string"
|
|
10352
|
+
}
|
|
9584
10353
|
}
|
|
9585
10354
|
],
|
|
9586
10355
|
"symbolId": "lib/gateway/outbound-auth/api-key:ApiKeyAdditionalConfiguration"
|
|
@@ -11791,6 +12560,84 @@
|
|
|
11791
12560
|
"name": "BrowserSigning",
|
|
11792
12561
|
"symbolId": "lib/tools/browser:BrowserSigning"
|
|
11793
12562
|
},
|
|
12563
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.CodeAssetOptions": {
|
|
12564
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
12565
|
+
"datatype": true,
|
|
12566
|
+
"docs": {
|
|
12567
|
+
"stability": "experimental",
|
|
12568
|
+
"summary": "Options for configuring an S3 code asset from local files for agent runtime artifact.",
|
|
12569
|
+
"example": "const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromCodeAsset({\n path: path.join(__dirname, 'path/to/agent/code'),\n runtime: agentcore.AgentCoreRuntime.PYTHON_3_12,\n entrypoint: ['opentelemetry-instrument', 'main.py'],\n});\n\nconst runtimeInstance = new agentcore.Runtime(this, \"MyAgentRuntime\", {\n runtimeName: \"myAgent\",\n agentRuntimeArtifact: agentRuntimeArtifact,\n});",
|
|
12570
|
+
"custom": {
|
|
12571
|
+
"exampleMetadata": "fixture=default infused"
|
|
12572
|
+
}
|
|
12573
|
+
},
|
|
12574
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.CodeAssetOptions",
|
|
12575
|
+
"interfaces": [
|
|
12576
|
+
"aws-cdk-lib.aws_s3_assets.AssetOptions"
|
|
12577
|
+
],
|
|
12578
|
+
"kind": "interface",
|
|
12579
|
+
"locationInModule": {
|
|
12580
|
+
"filename": "lib/runtime/runtime-artifact.ts",
|
|
12581
|
+
"line": 50
|
|
12582
|
+
},
|
|
12583
|
+
"name": "CodeAssetOptions",
|
|
12584
|
+
"properties": [
|
|
12585
|
+
{
|
|
12586
|
+
"abstract": true,
|
|
12587
|
+
"docs": {
|
|
12588
|
+
"stability": "experimental",
|
|
12589
|
+
"summary": "The entry point for the code execution, specifying the function or method that should be invoked when the code runs."
|
|
12590
|
+
},
|
|
12591
|
+
"immutable": true,
|
|
12592
|
+
"locationInModule": {
|
|
12593
|
+
"filename": "lib/runtime/runtime-artifact.ts",
|
|
12594
|
+
"line": 64
|
|
12595
|
+
},
|
|
12596
|
+
"name": "entrypoint",
|
|
12597
|
+
"type": {
|
|
12598
|
+
"collection": {
|
|
12599
|
+
"elementtype": {
|
|
12600
|
+
"primitive": "string"
|
|
12601
|
+
},
|
|
12602
|
+
"kind": "array"
|
|
12603
|
+
}
|
|
12604
|
+
}
|
|
12605
|
+
},
|
|
12606
|
+
{
|
|
12607
|
+
"abstract": true,
|
|
12608
|
+
"docs": {
|
|
12609
|
+
"stability": "experimental",
|
|
12610
|
+
"summary": "The file path to the code asset."
|
|
12611
|
+
},
|
|
12612
|
+
"immutable": true,
|
|
12613
|
+
"locationInModule": {
|
|
12614
|
+
"filename": "lib/runtime/runtime-artifact.ts",
|
|
12615
|
+
"line": 54
|
|
12616
|
+
},
|
|
12617
|
+
"name": "path",
|
|
12618
|
+
"type": {
|
|
12619
|
+
"primitive": "string"
|
|
12620
|
+
}
|
|
12621
|
+
},
|
|
12622
|
+
{
|
|
12623
|
+
"abstract": true,
|
|
12624
|
+
"docs": {
|
|
12625
|
+
"stability": "experimental",
|
|
12626
|
+
"summary": "The runtime environment for executing the code."
|
|
12627
|
+
},
|
|
12628
|
+
"immutable": true,
|
|
12629
|
+
"locationInModule": {
|
|
12630
|
+
"filename": "lib/runtime/runtime-artifact.ts",
|
|
12631
|
+
"line": 59
|
|
12632
|
+
},
|
|
12633
|
+
"name": "runtime",
|
|
12634
|
+
"type": {
|
|
12635
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.AgentCoreRuntime"
|
|
12636
|
+
}
|
|
12637
|
+
}
|
|
12638
|
+
],
|
|
12639
|
+
"symbolId": "lib/runtime/runtime-artifact:CodeAssetOptions"
|
|
12640
|
+
},
|
|
11794
12641
|
"@aws-cdk/aws-bedrock-agentcore-alpha.CodeInterpreterCustom": {
|
|
11795
12642
|
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
11796
12643
|
"base": "@aws-cdk/aws-bedrock-agentcore-alpha.CodeInterpreterCustomBase",
|
|
@@ -13673,7 +14520,7 @@
|
|
|
13673
14520
|
},
|
|
13674
14521
|
"locationInModule": {
|
|
13675
14522
|
"filename": "lib/gateway/gateway.ts",
|
|
13676
|
-
"line":
|
|
14523
|
+
"line": 502
|
|
13677
14524
|
},
|
|
13678
14525
|
"parameters": [
|
|
13679
14526
|
{
|
|
@@ -13700,7 +14547,7 @@
|
|
|
13700
14547
|
"kind": "class",
|
|
13701
14548
|
"locationInModule": {
|
|
13702
14549
|
"filename": "lib/gateway/gateway.ts",
|
|
13703
|
-
"line":
|
|
14550
|
+
"line": 329
|
|
13704
14551
|
},
|
|
13705
14552
|
"methods": [
|
|
13706
14553
|
{
|
|
@@ -13711,7 +14558,7 @@
|
|
|
13711
14558
|
},
|
|
13712
14559
|
"locationInModule": {
|
|
13713
14560
|
"filename": "lib/gateway/gateway.ts",
|
|
13714
|
-
"line":
|
|
14561
|
+
"line": 341
|
|
13715
14562
|
},
|
|
13716
14563
|
"name": "fromGatewayAttributes",
|
|
13717
14564
|
"parameters": [
|
|
@@ -13750,6 +14597,44 @@
|
|
|
13750
14597
|
},
|
|
13751
14598
|
"static": true
|
|
13752
14599
|
},
|
|
14600
|
+
{
|
|
14601
|
+
"docs": {
|
|
14602
|
+
"returns": "The created GatewayTarget",
|
|
14603
|
+
"see": "https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-target-api-gateway.html",
|
|
14604
|
+
"stability": "experimental",
|
|
14605
|
+
"summary": "Add an API Gateway target to this gateway This is a convenience method that creates a GatewayTarget associated with this gateway."
|
|
14606
|
+
},
|
|
14607
|
+
"locationInModule": {
|
|
14608
|
+
"filename": "lib/gateway/gateway.ts",
|
|
14609
|
+
"line": 704
|
|
14610
|
+
},
|
|
14611
|
+
"name": "addApiGatewayTarget",
|
|
14612
|
+
"parameters": [
|
|
14613
|
+
{
|
|
14614
|
+
"docs": {
|
|
14615
|
+
"summary": "The construct id for the target."
|
|
14616
|
+
},
|
|
14617
|
+
"name": "id",
|
|
14618
|
+
"type": {
|
|
14619
|
+
"primitive": "string"
|
|
14620
|
+
}
|
|
14621
|
+
},
|
|
14622
|
+
{
|
|
14623
|
+
"docs": {
|
|
14624
|
+
"summary": "Properties for the API Gateway target."
|
|
14625
|
+
},
|
|
14626
|
+
"name": "props",
|
|
14627
|
+
"type": {
|
|
14628
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.AddApiGatewayTargetOptions"
|
|
14629
|
+
}
|
|
14630
|
+
}
|
|
14631
|
+
],
|
|
14632
|
+
"returns": {
|
|
14633
|
+
"type": {
|
|
14634
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTarget"
|
|
14635
|
+
}
|
|
14636
|
+
}
|
|
14637
|
+
},
|
|
13753
14638
|
{
|
|
13754
14639
|
"docs": {
|
|
13755
14640
|
"custom": {
|
|
@@ -13761,7 +14646,7 @@
|
|
|
13761
14646
|
},
|
|
13762
14647
|
"locationInModule": {
|
|
13763
14648
|
"filename": "lib/gateway/gateway.ts",
|
|
13764
|
-
"line":
|
|
14649
|
+
"line": 937
|
|
13765
14650
|
},
|
|
13766
14651
|
"name": "addInterceptor",
|
|
13767
14652
|
"parameters": [
|
|
@@ -13784,7 +14669,7 @@
|
|
|
13784
14669
|
},
|
|
13785
14670
|
"locationInModule": {
|
|
13786
14671
|
"filename": "lib/gateway/gateway.ts",
|
|
13787
|
-
"line":
|
|
14672
|
+
"line": 588
|
|
13788
14673
|
},
|
|
13789
14674
|
"name": "addLambdaTarget",
|
|
13790
14675
|
"parameters": [
|
|
@@ -13822,7 +14707,7 @@
|
|
|
13822
14707
|
},
|
|
13823
14708
|
"locationInModule": {
|
|
13824
14709
|
"filename": "lib/gateway/gateway.ts",
|
|
13825
|
-
"line":
|
|
14710
|
+
"line": 674
|
|
13826
14711
|
},
|
|
13827
14712
|
"name": "addMcpServerTarget",
|
|
13828
14713
|
"parameters": [
|
|
@@ -13859,7 +14744,7 @@
|
|
|
13859
14744
|
},
|
|
13860
14745
|
"locationInModule": {
|
|
13861
14746
|
"filename": "lib/gateway/gateway.ts",
|
|
13862
|
-
"line":
|
|
14747
|
+
"line": 619
|
|
13863
14748
|
},
|
|
13864
14749
|
"name": "addOpenApiTarget",
|
|
13865
14750
|
"parameters": [
|
|
@@ -13896,7 +14781,7 @@
|
|
|
13896
14781
|
},
|
|
13897
14782
|
"locationInModule": {
|
|
13898
14783
|
"filename": "lib/gateway/gateway.ts",
|
|
13899
|
-
"line":
|
|
14784
|
+
"line": 644
|
|
13900
14785
|
},
|
|
13901
14786
|
"name": "addSmithyTarget",
|
|
13902
14787
|
"parameters": [
|
|
@@ -13937,7 +14822,7 @@
|
|
|
13937
14822
|
"immutable": true,
|
|
13938
14823
|
"locationInModule": {
|
|
13939
14824
|
"filename": "lib/gateway/gateway.ts",
|
|
13940
|
-
"line":
|
|
14825
|
+
"line": 332
|
|
13941
14826
|
},
|
|
13942
14827
|
"name": "PROPERTY_INJECTION_ID",
|
|
13943
14828
|
"static": true,
|
|
@@ -13953,7 +14838,7 @@
|
|
|
13953
14838
|
"immutable": true,
|
|
13954
14839
|
"locationInModule": {
|
|
13955
14840
|
"filename": "lib/gateway/gateway.ts",
|
|
13956
|
-
"line":
|
|
14841
|
+
"line": 406
|
|
13957
14842
|
},
|
|
13958
14843
|
"name": "authorizerConfiguration",
|
|
13959
14844
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayBase",
|
|
@@ -13972,7 +14857,7 @@
|
|
|
13972
14857
|
"immutable": true,
|
|
13973
14858
|
"locationInModule": {
|
|
13974
14859
|
"filename": "lib/gateway/gateway.ts",
|
|
13975
|
-
"line":
|
|
14860
|
+
"line": 380
|
|
13976
14861
|
},
|
|
13977
14862
|
"name": "gatewayArn",
|
|
13978
14863
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayBase",
|
|
@@ -13991,7 +14876,7 @@
|
|
|
13991
14876
|
"immutable": true,
|
|
13992
14877
|
"locationInModule": {
|
|
13993
14878
|
"filename": "lib/gateway/gateway.ts",
|
|
13994
|
-
"line":
|
|
14879
|
+
"line": 386
|
|
13995
14880
|
},
|
|
13996
14881
|
"name": "gatewayId",
|
|
13997
14882
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayBase",
|
|
@@ -14007,7 +14892,7 @@
|
|
|
14007
14892
|
"immutable": true,
|
|
14008
14893
|
"locationInModule": {
|
|
14009
14894
|
"filename": "lib/gateway/gateway.ts",
|
|
14010
|
-
"line":
|
|
14895
|
+
"line": 391
|
|
14011
14896
|
},
|
|
14012
14897
|
"name": "name",
|
|
14013
14898
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayBase",
|
|
@@ -14023,7 +14908,7 @@
|
|
|
14023
14908
|
"immutable": true,
|
|
14024
14909
|
"locationInModule": {
|
|
14025
14910
|
"filename": "lib/gateway/gateway.ts",
|
|
14026
|
-
"line":
|
|
14911
|
+
"line": 401
|
|
14027
14912
|
},
|
|
14028
14913
|
"name": "protocolConfiguration",
|
|
14029
14914
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayBase",
|
|
@@ -14039,7 +14924,7 @@
|
|
|
14039
14924
|
"immutable": true,
|
|
14040
14925
|
"locationInModule": {
|
|
14041
14926
|
"filename": "lib/gateway/gateway.ts",
|
|
14042
|
-
"line":
|
|
14927
|
+
"line": 421
|
|
14043
14928
|
},
|
|
14044
14929
|
"name": "role",
|
|
14045
14930
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayBase",
|
|
@@ -14058,7 +14943,7 @@
|
|
|
14058
14943
|
"immutable": true,
|
|
14059
14944
|
"locationInModule": {
|
|
14060
14945
|
"filename": "lib/gateway/gateway.ts",
|
|
14061
|
-
"line":
|
|
14946
|
+
"line": 445
|
|
14062
14947
|
},
|
|
14063
14948
|
"name": "createdAt",
|
|
14064
14949
|
"optional": true,
|
|
@@ -14075,7 +14960,7 @@
|
|
|
14075
14960
|
"immutable": true,
|
|
14076
14961
|
"locationInModule": {
|
|
14077
14962
|
"filename": "lib/gateway/gateway.ts",
|
|
14078
|
-
"line":
|
|
14963
|
+
"line": 396
|
|
14079
14964
|
},
|
|
14080
14965
|
"name": "description",
|
|
14081
14966
|
"optional": true,
|
|
@@ -14092,7 +14977,7 @@
|
|
|
14092
14977
|
"immutable": true,
|
|
14093
14978
|
"locationInModule": {
|
|
14094
14979
|
"filename": "lib/gateway/gateway.ts",
|
|
14095
|
-
"line":
|
|
14980
|
+
"line": 411
|
|
14096
14981
|
},
|
|
14097
14982
|
"name": "exceptionLevel",
|
|
14098
14983
|
"optional": true,
|
|
@@ -14112,7 +14997,7 @@
|
|
|
14112
14997
|
"immutable": true,
|
|
14113
14998
|
"locationInModule": {
|
|
14114
14999
|
"filename": "lib/gateway/gateway.ts",
|
|
14115
|
-
"line":
|
|
15000
|
+
"line": 427
|
|
14116
15001
|
},
|
|
14117
15002
|
"name": "gatewayUrl",
|
|
14118
15003
|
"optional": true,
|
|
@@ -14129,7 +15014,7 @@
|
|
|
14129
15014
|
"immutable": true,
|
|
14130
15015
|
"locationInModule": {
|
|
14131
15016
|
"filename": "lib/gateway/gateway.ts",
|
|
14132
|
-
"line":
|
|
15017
|
+
"line": 416
|
|
14133
15018
|
},
|
|
14134
15019
|
"name": "kmsKey",
|
|
14135
15020
|
"optional": true,
|
|
@@ -14147,7 +15032,7 @@
|
|
|
14147
15032
|
"immutable": true,
|
|
14148
15033
|
"locationInModule": {
|
|
14149
15034
|
"filename": "lib/gateway/gateway.ts",
|
|
14150
|
-
"line":
|
|
15035
|
+
"line": 500
|
|
14151
15036
|
},
|
|
14152
15037
|
"name": "oauthScopes",
|
|
14153
15038
|
"optional": true,
|
|
@@ -14171,7 +15056,7 @@
|
|
|
14171
15056
|
"immutable": true,
|
|
14172
15057
|
"locationInModule": {
|
|
14173
15058
|
"filename": "lib/gateway/gateway.ts",
|
|
14174
|
-
"line":
|
|
15059
|
+
"line": 433
|
|
14175
15060
|
},
|
|
14176
15061
|
"name": "status",
|
|
14177
15062
|
"optional": true,
|
|
@@ -14191,7 +15076,7 @@
|
|
|
14191
15076
|
"immutable": true,
|
|
14192
15077
|
"locationInModule": {
|
|
14193
15078
|
"filename": "lib/gateway/gateway.ts",
|
|
14194
|
-
"line":
|
|
15079
|
+
"line": 439
|
|
14195
15080
|
},
|
|
14196
15081
|
"name": "statusReason",
|
|
14197
15082
|
"optional": true,
|
|
@@ -14213,7 +15098,7 @@
|
|
|
14213
15098
|
"immutable": true,
|
|
14214
15099
|
"locationInModule": {
|
|
14215
15100
|
"filename": "lib/gateway/gateway.ts",
|
|
14216
|
-
"line":
|
|
15101
|
+
"line": 456
|
|
14217
15102
|
},
|
|
14218
15103
|
"name": "tags",
|
|
14219
15104
|
"optional": true,
|
|
@@ -14235,7 +15120,7 @@
|
|
|
14235
15120
|
"immutable": true,
|
|
14236
15121
|
"locationInModule": {
|
|
14237
15122
|
"filename": "lib/gateway/gateway.ts",
|
|
14238
|
-
"line":
|
|
15123
|
+
"line": 494
|
|
14239
15124
|
},
|
|
14240
15125
|
"name": "tokenEndpointUrl",
|
|
14241
15126
|
"optional": true,
|
|
@@ -14254,7 +15139,7 @@
|
|
|
14254
15139
|
"immutable": true,
|
|
14255
15140
|
"locationInModule": {
|
|
14256
15141
|
"filename": "lib/gateway/gateway.ts",
|
|
14257
|
-
"line":
|
|
15142
|
+
"line": 451
|
|
14258
15143
|
},
|
|
14259
15144
|
"name": "updatedAt",
|
|
14260
15145
|
"optional": true,
|
|
@@ -14270,7 +15155,7 @@
|
|
|
14270
15155
|
},
|
|
14271
15156
|
"locationInModule": {
|
|
14272
15157
|
"filename": "lib/gateway/gateway.ts",
|
|
14273
|
-
"line":
|
|
15158
|
+
"line": 488
|
|
14274
15159
|
},
|
|
14275
15160
|
"name": "resourceServer",
|
|
14276
15161
|
"optional": true,
|
|
@@ -14285,7 +15170,7 @@
|
|
|
14285
15170
|
},
|
|
14286
15171
|
"locationInModule": {
|
|
14287
15172
|
"filename": "lib/gateway/gateway.ts",
|
|
14288
|
-
"line":
|
|
15173
|
+
"line": 461
|
|
14289
15174
|
},
|
|
14290
15175
|
"name": "userPool",
|
|
14291
15176
|
"optional": true,
|
|
@@ -14300,7 +15185,7 @@
|
|
|
14300
15185
|
},
|
|
14301
15186
|
"locationInModule": {
|
|
14302
15187
|
"filename": "lib/gateway/gateway.ts",
|
|
14303
|
-
"line":
|
|
15188
|
+
"line": 466
|
|
14304
15189
|
},
|
|
14305
15190
|
"name": "userPoolClient",
|
|
14306
15191
|
"optional": true,
|
|
@@ -14315,7 +15200,7 @@
|
|
|
14315
15200
|
},
|
|
14316
15201
|
"locationInModule": {
|
|
14317
15202
|
"filename": "lib/gateway/gateway.ts",
|
|
14318
|
-
"line":
|
|
15203
|
+
"line": 483
|
|
14319
15204
|
},
|
|
14320
15205
|
"name": "userPoolDomain",
|
|
14321
15206
|
"optional": true,
|
|
@@ -14341,7 +15226,7 @@
|
|
|
14341
15226
|
"kind": "interface",
|
|
14342
15227
|
"locationInModule": {
|
|
14343
15228
|
"filename": "lib/gateway/gateway.ts",
|
|
14344
|
-
"line":
|
|
15229
|
+
"line": 297
|
|
14345
15230
|
},
|
|
14346
15231
|
"name": "GatewayAttributes",
|
|
14347
15232
|
"properties": [
|
|
@@ -14354,7 +15239,7 @@
|
|
|
14354
15239
|
"immutable": true,
|
|
14355
15240
|
"locationInModule": {
|
|
14356
15241
|
"filename": "lib/gateway/gateway.ts",
|
|
14357
|
-
"line":
|
|
15242
|
+
"line": 301
|
|
14358
15243
|
},
|
|
14359
15244
|
"name": "gatewayArn",
|
|
14360
15245
|
"type": {
|
|
@@ -14370,7 +15255,7 @@
|
|
|
14370
15255
|
"immutable": true,
|
|
14371
15256
|
"locationInModule": {
|
|
14372
15257
|
"filename": "lib/gateway/gateway.ts",
|
|
14373
|
-
"line":
|
|
15258
|
+
"line": 306
|
|
14374
15259
|
},
|
|
14375
15260
|
"name": "gatewayId",
|
|
14376
15261
|
"type": {
|
|
@@ -14386,7 +15271,7 @@
|
|
|
14386
15271
|
"immutable": true,
|
|
14387
15272
|
"locationInModule": {
|
|
14388
15273
|
"filename": "lib/gateway/gateway.ts",
|
|
14389
|
-
"line":
|
|
15274
|
+
"line": 311
|
|
14390
15275
|
},
|
|
14391
15276
|
"name": "gatewayName",
|
|
14392
15277
|
"type": {
|
|
@@ -14402,7 +15287,7 @@
|
|
|
14402
15287
|
"immutable": true,
|
|
14403
15288
|
"locationInModule": {
|
|
14404
15289
|
"filename": "lib/gateway/gateway.ts",
|
|
14405
|
-
"line":
|
|
15290
|
+
"line": 316
|
|
14406
15291
|
},
|
|
14407
15292
|
"name": "role",
|
|
14408
15293
|
"type": {
|
|
@@ -15526,7 +16411,7 @@
|
|
|
15526
16411
|
"kind": "interface",
|
|
15527
16412
|
"locationInModule": {
|
|
15528
16413
|
"filename": "lib/gateway/gateway.ts",
|
|
15529
|
-
"line":
|
|
16414
|
+
"line": 221
|
|
15530
16415
|
},
|
|
15531
16416
|
"name": "GatewayProps",
|
|
15532
16417
|
"properties": [
|
|
@@ -15540,7 +16425,7 @@
|
|
|
15540
16425
|
"immutable": true,
|
|
15541
16426
|
"locationInModule": {
|
|
15542
16427
|
"filename": "lib/gateway/gateway.ts",
|
|
15543
|
-
"line":
|
|
16428
|
+
"line": 251
|
|
15544
16429
|
},
|
|
15545
16430
|
"name": "authorizerConfiguration",
|
|
15546
16431
|
"optional": true,
|
|
@@ -15558,7 +16443,7 @@
|
|
|
15558
16443
|
"immutable": true,
|
|
15559
16444
|
"locationInModule": {
|
|
15560
16445
|
"filename": "lib/gateway/gateway.ts",
|
|
15561
|
-
"line":
|
|
16446
|
+
"line": 236
|
|
15562
16447
|
},
|
|
15563
16448
|
"name": "description",
|
|
15564
16449
|
"optional": true,
|
|
@@ -15576,7 +16461,7 @@
|
|
|
15576
16461
|
"immutable": true,
|
|
15577
16462
|
"locationInModule": {
|
|
15578
16463
|
"filename": "lib/gateway/gateway.ts",
|
|
15579
|
-
"line":
|
|
16464
|
+
"line": 258
|
|
15580
16465
|
},
|
|
15581
16466
|
"name": "exceptionLevel",
|
|
15582
16467
|
"optional": true,
|
|
@@ -15594,7 +16479,7 @@
|
|
|
15594
16479
|
"immutable": true,
|
|
15595
16480
|
"locationInModule": {
|
|
15596
16481
|
"filename": "lib/gateway/gateway.ts",
|
|
15597
|
-
"line":
|
|
16482
|
+
"line": 228
|
|
15598
16483
|
},
|
|
15599
16484
|
"name": "gatewayName",
|
|
15600
16485
|
"optional": true,
|
|
@@ -15614,7 +16499,7 @@
|
|
|
15614
16499
|
"immutable": true,
|
|
15615
16500
|
"locationInModule": {
|
|
15616
16501
|
"filename": "lib/gateway/gateway.ts",
|
|
15617
|
-
"line":
|
|
16502
|
+
"line": 291
|
|
15618
16503
|
},
|
|
15619
16504
|
"name": "interceptorConfigurations",
|
|
15620
16505
|
"optional": true,
|
|
@@ -15637,7 +16522,7 @@
|
|
|
15637
16522
|
"immutable": true,
|
|
15638
16523
|
"locationInModule": {
|
|
15639
16524
|
"filename": "lib/gateway/gateway.ts",
|
|
15640
|
-
"line":
|
|
16525
|
+
"line": 264
|
|
15641
16526
|
},
|
|
15642
16527
|
"name": "kmsKey",
|
|
15643
16528
|
"optional": true,
|
|
@@ -15655,7 +16540,7 @@
|
|
|
15655
16540
|
"immutable": true,
|
|
15656
16541
|
"locationInModule": {
|
|
15657
16542
|
"filename": "lib/gateway/gateway.ts",
|
|
15658
|
-
"line":
|
|
16543
|
+
"line": 245
|
|
15659
16544
|
},
|
|
15660
16545
|
"name": "protocolConfiguration",
|
|
15661
16546
|
"optional": true,
|
|
@@ -15673,7 +16558,7 @@
|
|
|
15673
16558
|
"immutable": true,
|
|
15674
16559
|
"locationInModule": {
|
|
15675
16560
|
"filename": "lib/gateway/gateway.ts",
|
|
15676
|
-
"line":
|
|
16561
|
+
"line": 270
|
|
15677
16562
|
},
|
|
15678
16563
|
"name": "role",
|
|
15679
16564
|
"optional": true,
|
|
@@ -15691,7 +16576,7 @@
|
|
|
15691
16576
|
"immutable": true,
|
|
15692
16577
|
"locationInModule": {
|
|
15693
16578
|
"filename": "lib/gateway/gateway.ts",
|
|
15694
|
-
"line":
|
|
16579
|
+
"line": 277
|
|
15695
16580
|
},
|
|
15696
16581
|
"name": "tags",
|
|
15697
16582
|
"optional": true,
|
|
@@ -15781,7 +16666,7 @@
|
|
|
15781
16666
|
},
|
|
15782
16667
|
"locationInModule": {
|
|
15783
16668
|
"filename": "lib/gateway/targets/target.ts",
|
|
15784
|
-
"line":
|
|
16669
|
+
"line": 508
|
|
15785
16670
|
},
|
|
15786
16671
|
"parameters": [
|
|
15787
16672
|
{
|
|
@@ -15810,9 +16695,57 @@
|
|
|
15810
16695
|
"kind": "class",
|
|
15811
16696
|
"locationInModule": {
|
|
15812
16697
|
"filename": "lib/gateway/targets/target.ts",
|
|
15813
|
-
"line":
|
|
16698
|
+
"line": 275
|
|
15814
16699
|
},
|
|
15815
16700
|
"methods": [
|
|
16701
|
+
{
|
|
16702
|
+
"docs": {
|
|
16703
|
+
"returns": "A new GatewayTarget instance",
|
|
16704
|
+
"see": "https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-target-api-gateway.html",
|
|
16705
|
+
"stability": "experimental",
|
|
16706
|
+
"summary": "Create an API Gateway-based target Convenience method for creating a target that connects to an API Gateway REST API."
|
|
16707
|
+
},
|
|
16708
|
+
"locationInModule": {
|
|
16709
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
16710
|
+
"line": 420
|
|
16711
|
+
},
|
|
16712
|
+
"name": "forApiGateway",
|
|
16713
|
+
"parameters": [
|
|
16714
|
+
{
|
|
16715
|
+
"docs": {
|
|
16716
|
+
"summary": "The construct scope."
|
|
16717
|
+
},
|
|
16718
|
+
"name": "scope",
|
|
16719
|
+
"type": {
|
|
16720
|
+
"fqn": "constructs.Construct"
|
|
16721
|
+
}
|
|
16722
|
+
},
|
|
16723
|
+
{
|
|
16724
|
+
"docs": {
|
|
16725
|
+
"summary": "The construct id."
|
|
16726
|
+
},
|
|
16727
|
+
"name": "id",
|
|
16728
|
+
"type": {
|
|
16729
|
+
"primitive": "string"
|
|
16730
|
+
}
|
|
16731
|
+
},
|
|
16732
|
+
{
|
|
16733
|
+
"docs": {
|
|
16734
|
+
"summary": "The properties for the API Gateway target."
|
|
16735
|
+
},
|
|
16736
|
+
"name": "props",
|
|
16737
|
+
"type": {
|
|
16738
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetApiGatewayProps"
|
|
16739
|
+
}
|
|
16740
|
+
}
|
|
16741
|
+
],
|
|
16742
|
+
"returns": {
|
|
16743
|
+
"type": {
|
|
16744
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTarget"
|
|
16745
|
+
}
|
|
16746
|
+
},
|
|
16747
|
+
"static": true
|
|
16748
|
+
},
|
|
15816
16749
|
{
|
|
15817
16750
|
"docs": {
|
|
15818
16751
|
"returns": "A new GatewayTarget instance",
|
|
@@ -15821,7 +16754,7 @@
|
|
|
15821
16754
|
},
|
|
15822
16755
|
"locationInModule": {
|
|
15823
16756
|
"filename": "lib/gateway/targets/target.ts",
|
|
15824
|
-
"line":
|
|
16757
|
+
"line": 322
|
|
15825
16758
|
},
|
|
15826
16759
|
"name": "forLambda",
|
|
15827
16760
|
"parameters": [
|
|
@@ -15869,7 +16802,7 @@
|
|
|
15869
16802
|
},
|
|
15870
16803
|
"locationInModule": {
|
|
15871
16804
|
"filename": "lib/gateway/targets/target.ts",
|
|
15872
|
-
"line":
|
|
16805
|
+
"line": 396
|
|
15873
16806
|
},
|
|
15874
16807
|
"name": "forMcpServer",
|
|
15875
16808
|
"parameters": [
|
|
@@ -15916,7 +16849,7 @@
|
|
|
15916
16849
|
},
|
|
15917
16850
|
"locationInModule": {
|
|
15918
16851
|
"filename": "lib/gateway/targets/target.ts",
|
|
15919
|
-
"line":
|
|
16852
|
+
"line": 349
|
|
15920
16853
|
},
|
|
15921
16854
|
"name": "forOpenApi",
|
|
15922
16855
|
"parameters": [
|
|
@@ -15963,7 +16896,7 @@
|
|
|
15963
16896
|
},
|
|
15964
16897
|
"locationInModule": {
|
|
15965
16898
|
"filename": "lib/gateway/targets/target.ts",
|
|
15966
|
-
"line":
|
|
16899
|
+
"line": 372
|
|
15967
16900
|
},
|
|
15968
16901
|
"name": "forSmithy",
|
|
15969
16902
|
"parameters": [
|
|
@@ -16010,7 +16943,7 @@
|
|
|
16010
16943
|
},
|
|
16011
16944
|
"locationInModule": {
|
|
16012
16945
|
"filename": "lib/gateway/targets/target.ts",
|
|
16013
|
-
"line":
|
|
16946
|
+
"line": 288
|
|
16014
16947
|
},
|
|
16015
16948
|
"name": "fromGatewayTargetAttributes",
|
|
16016
16949
|
"parameters": [
|
|
@@ -16057,7 +16990,7 @@
|
|
|
16057
16990
|
},
|
|
16058
16991
|
"locationInModule": {
|
|
16059
16992
|
"filename": "lib/gateway/targets/target.ts",
|
|
16060
|
-
"line":
|
|
16993
|
+
"line": 597
|
|
16061
16994
|
},
|
|
16062
16995
|
"name": "grantSync",
|
|
16063
16996
|
"parameters": [
|
|
@@ -16086,7 +17019,7 @@
|
|
|
16086
17019
|
"immutable": true,
|
|
16087
17020
|
"locationInModule": {
|
|
16088
17021
|
"filename": "lib/gateway/targets/target.ts",
|
|
16089
|
-
"line":
|
|
17022
|
+
"line": 278
|
|
16090
17023
|
},
|
|
16091
17024
|
"name": "PROPERTY_INJECTION_ID",
|
|
16092
17025
|
"static": true,
|
|
@@ -16102,7 +17035,7 @@
|
|
|
16102
17035
|
"immutable": true,
|
|
16103
17036
|
"locationInModule": {
|
|
16104
17037
|
"filename": "lib/gateway/targets/target.ts",
|
|
16105
|
-
"line":
|
|
17038
|
+
"line": 464
|
|
16106
17039
|
},
|
|
16107
17040
|
"name": "gateway",
|
|
16108
17041
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
@@ -16118,7 +17051,7 @@
|
|
|
16118
17051
|
"immutable": true,
|
|
16119
17052
|
"locationInModule": {
|
|
16120
17053
|
"filename": "lib/gateway/targets/target.ts",
|
|
16121
|
-
"line":
|
|
17054
|
+
"line": 454
|
|
16122
17055
|
},
|
|
16123
17056
|
"name": "name",
|
|
16124
17057
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
@@ -16137,7 +17070,7 @@
|
|
|
16137
17070
|
"immutable": true,
|
|
16138
17071
|
"locationInModule": {
|
|
16139
17072
|
"filename": "lib/gateway/targets/target.ts",
|
|
16140
|
-
"line":
|
|
17073
|
+
"line": 443
|
|
16141
17074
|
},
|
|
16142
17075
|
"name": "targetArn",
|
|
16143
17076
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
@@ -16156,7 +17089,7 @@
|
|
|
16156
17089
|
"immutable": true,
|
|
16157
17090
|
"locationInModule": {
|
|
16158
17091
|
"filename": "lib/gateway/targets/target.ts",
|
|
16159
|
-
"line":
|
|
17092
|
+
"line": 449
|
|
16160
17093
|
},
|
|
16161
17094
|
"name": "targetId",
|
|
16162
17095
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
@@ -16172,7 +17105,7 @@
|
|
|
16172
17105
|
"immutable": true,
|
|
16173
17106
|
"locationInModule": {
|
|
16174
17107
|
"filename": "lib/gateway/targets/target.ts",
|
|
16175
|
-
"line":
|
|
17108
|
+
"line": 474
|
|
16176
17109
|
},
|
|
16177
17110
|
"name": "targetProtocolType",
|
|
16178
17111
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
@@ -16188,7 +17121,7 @@
|
|
|
16188
17121
|
"immutable": true,
|
|
16189
17122
|
"locationInModule": {
|
|
16190
17123
|
"filename": "lib/gateway/targets/target.ts",
|
|
16191
|
-
"line":
|
|
17124
|
+
"line": 479
|
|
16192
17125
|
},
|
|
16193
17126
|
"name": "targetType",
|
|
16194
17127
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IMcpGatewayTarget",
|
|
@@ -16207,7 +17140,7 @@
|
|
|
16207
17140
|
"immutable": true,
|
|
16208
17141
|
"locationInModule": {
|
|
16209
17142
|
"filename": "lib/gateway/targets/target.ts",
|
|
16210
|
-
"line":
|
|
17143
|
+
"line": 497
|
|
16211
17144
|
},
|
|
16212
17145
|
"name": "createdAt",
|
|
16213
17146
|
"optional": true,
|
|
@@ -16224,7 +17157,7 @@
|
|
|
16224
17157
|
"immutable": true,
|
|
16225
17158
|
"locationInModule": {
|
|
16226
17159
|
"filename": "lib/gateway/targets/target.ts",
|
|
16227
|
-
"line":
|
|
17160
|
+
"line": 469
|
|
16228
17161
|
},
|
|
16229
17162
|
"name": "credentialProviderConfigurations",
|
|
16230
17163
|
"optional": true,
|
|
@@ -16246,7 +17179,7 @@
|
|
|
16246
17179
|
"immutable": true,
|
|
16247
17180
|
"locationInModule": {
|
|
16248
17181
|
"filename": "lib/gateway/targets/target.ts",
|
|
16249
|
-
"line":
|
|
17182
|
+
"line": 459
|
|
16250
17183
|
},
|
|
16251
17184
|
"name": "description",
|
|
16252
17185
|
"optional": true,
|
|
@@ -16266,62 +17199,194 @@
|
|
|
16266
17199
|
"immutable": true,
|
|
16267
17200
|
"locationInModule": {
|
|
16268
17201
|
"filename": "lib/gateway/targets/target.ts",
|
|
16269
|
-
"line":
|
|
17202
|
+
"line": 485
|
|
16270
17203
|
},
|
|
16271
17204
|
"name": "status",
|
|
16272
17205
|
"optional": true,
|
|
16273
|
-
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
17206
|
+
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
17207
|
+
"type": {
|
|
17208
|
+
"primitive": "string"
|
|
17209
|
+
}
|
|
17210
|
+
},
|
|
17211
|
+
{
|
|
17212
|
+
"docs": {
|
|
17213
|
+
"custom": {
|
|
17214
|
+
"attribute": "true"
|
|
17215
|
+
},
|
|
17216
|
+
"stability": "experimental",
|
|
17217
|
+
"summary": "The status reasons for the gateway target."
|
|
17218
|
+
},
|
|
17219
|
+
"immutable": true,
|
|
17220
|
+
"locationInModule": {
|
|
17221
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
17222
|
+
"line": 491
|
|
17223
|
+
},
|
|
17224
|
+
"name": "statusReasons",
|
|
17225
|
+
"optional": true,
|
|
17226
|
+
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
17227
|
+
"type": {
|
|
17228
|
+
"collection": {
|
|
17229
|
+
"elementtype": {
|
|
17230
|
+
"primitive": "string"
|
|
17231
|
+
},
|
|
17232
|
+
"kind": "array"
|
|
17233
|
+
}
|
|
17234
|
+
}
|
|
17235
|
+
},
|
|
17236
|
+
{
|
|
17237
|
+
"docs": {
|
|
17238
|
+
"custom": {
|
|
17239
|
+
"attribute": "true"
|
|
17240
|
+
},
|
|
17241
|
+
"stability": "experimental",
|
|
17242
|
+
"summary": "Timestamp when the gateway target was last updated."
|
|
17243
|
+
},
|
|
17244
|
+
"immutable": true,
|
|
17245
|
+
"locationInModule": {
|
|
17246
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
17247
|
+
"line": 503
|
|
17248
|
+
},
|
|
17249
|
+
"name": "updatedAt",
|
|
17250
|
+
"optional": true,
|
|
17251
|
+
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
17252
|
+
"type": {
|
|
17253
|
+
"primitive": "string"
|
|
17254
|
+
}
|
|
17255
|
+
}
|
|
17256
|
+
],
|
|
17257
|
+
"symbolId": "lib/gateway/targets/target:GatewayTarget"
|
|
17258
|
+
},
|
|
17259
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetApiGatewayProps": {
|
|
17260
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
17261
|
+
"datatype": true,
|
|
17262
|
+
"docs": {
|
|
17263
|
+
"stability": "experimental",
|
|
17264
|
+
"summary": "Properties for creating an API Gateway-based Gateway Target.",
|
|
17265
|
+
"example": "const gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst api = new apigateway.RestApi(this, 'MyApi', {\n restApiName: 'my-api',\n});\n\n// Create a gateway target using the static factory method\nconst apiGatewayTarget = agentcore.GatewayTarget.forApiGateway(this, \"MyApiGatewayTarget\", {\n gatewayTargetName: \"my-api-gateway-target\",\n description: \"Target for API Gateway REST API integration\",\n gateway: gateway,\n restApi: api,\n apiGatewayToolConfiguration: {\n toolFilters: [\n {\n filterPath: \"/pets/*\",\n methods: [agentcore.ApiGatewayHttpMethod.GET, agentcore.ApiGatewayHttpMethod.POST],\n },\n ],\n },\n metadataConfiguration: {\n allowedRequestHeaders: [\"X-User-Id\"],\n allowedQueryParameters: [\"limit\"],\n },\n});",
|
|
17266
|
+
"custom": {
|
|
17267
|
+
"exampleMetadata": "fixture=default infused"
|
|
17268
|
+
}
|
|
17269
|
+
},
|
|
17270
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetApiGatewayProps",
|
|
17271
|
+
"interfaces": [
|
|
17272
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetCommonProps"
|
|
17273
|
+
],
|
|
17274
|
+
"kind": "interface",
|
|
17275
|
+
"locationInModule": {
|
|
17276
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
17277
|
+
"line": 178
|
|
17278
|
+
},
|
|
17279
|
+
"name": "GatewayTargetApiGatewayProps",
|
|
17280
|
+
"properties": [
|
|
17281
|
+
{
|
|
17282
|
+
"abstract": true,
|
|
17283
|
+
"docs": {
|
|
17284
|
+
"stability": "experimental",
|
|
17285
|
+
"summary": "Tool configuration defining which operations to expose."
|
|
17286
|
+
},
|
|
17287
|
+
"immutable": true,
|
|
17288
|
+
"locationInModule": {
|
|
17289
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
17290
|
+
"line": 201
|
|
17291
|
+
},
|
|
17292
|
+
"name": "apiGatewayToolConfiguration",
|
|
17293
|
+
"type": {
|
|
17294
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ApiGatewayToolConfiguration"
|
|
17295
|
+
}
|
|
17296
|
+
},
|
|
17297
|
+
{
|
|
17298
|
+
"abstract": true,
|
|
17299
|
+
"docs": {
|
|
17300
|
+
"stability": "experimental",
|
|
17301
|
+
"summary": "The gateway this target belongs to [disable-awslint:prefer-ref-interface]."
|
|
17302
|
+
},
|
|
17303
|
+
"immutable": true,
|
|
17304
|
+
"locationInModule": {
|
|
17305
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
17306
|
+
"line": 183
|
|
17307
|
+
},
|
|
17308
|
+
"name": "gateway",
|
|
17309
|
+
"type": {
|
|
17310
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.IGateway"
|
|
17311
|
+
}
|
|
17312
|
+
},
|
|
17313
|
+
{
|
|
17314
|
+
"abstract": true,
|
|
17315
|
+
"docs": {
|
|
17316
|
+
"stability": "experimental",
|
|
17317
|
+
"summary": "The REST API to integrate with Must be in the same account and region as the gateway [disable-awslint:prefer-ref-interface]."
|
|
17318
|
+
},
|
|
17319
|
+
"immutable": true,
|
|
17320
|
+
"locationInModule": {
|
|
17321
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
17322
|
+
"line": 190
|
|
17323
|
+
},
|
|
17324
|
+
"name": "restApi",
|
|
17325
|
+
"type": {
|
|
17326
|
+
"fqn": "aws-cdk-lib.aws_apigateway.IRestApi"
|
|
17327
|
+
}
|
|
17328
|
+
},
|
|
17329
|
+
{
|
|
17330
|
+
"abstract": true,
|
|
17331
|
+
"docs": {
|
|
17332
|
+
"default": "- Empty array (service handles IAM automatically)",
|
|
17333
|
+
"stability": "experimental",
|
|
17334
|
+
"summary": "Credential providers for authentication API Gateway targets support IAM and API key authentication."
|
|
17335
|
+
},
|
|
17336
|
+
"immutable": true,
|
|
17337
|
+
"locationInModule": {
|
|
17338
|
+
"filename": "lib/gateway/targets/target.ts",
|
|
17339
|
+
"line": 208
|
|
17340
|
+
},
|
|
17341
|
+
"name": "credentialProviderConfigurations",
|
|
17342
|
+
"optional": true,
|
|
16274
17343
|
"type": {
|
|
16275
|
-
"
|
|
17344
|
+
"collection": {
|
|
17345
|
+
"elementtype": {
|
|
17346
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.ICredentialProviderConfig"
|
|
17347
|
+
},
|
|
17348
|
+
"kind": "array"
|
|
17349
|
+
}
|
|
16276
17350
|
}
|
|
16277
17351
|
},
|
|
16278
17352
|
{
|
|
17353
|
+
"abstract": true,
|
|
16279
17354
|
"docs": {
|
|
16280
|
-
"
|
|
16281
|
-
"attribute": "true"
|
|
16282
|
-
},
|
|
17355
|
+
"default": "- No metadata configuration",
|
|
16283
17356
|
"stability": "experimental",
|
|
16284
|
-
"summary": "
|
|
17357
|
+
"summary": "Metadata configuration for passing headers and query parameters Allows you to pass additional context through headers and query parameters."
|
|
16285
17358
|
},
|
|
16286
17359
|
"immutable": true,
|
|
16287
17360
|
"locationInModule": {
|
|
16288
17361
|
"filename": "lib/gateway/targets/target.ts",
|
|
16289
|
-
"line":
|
|
17362
|
+
"line": 215
|
|
16290
17363
|
},
|
|
16291
|
-
"name": "
|
|
17364
|
+
"name": "metadataConfiguration",
|
|
16292
17365
|
"optional": true,
|
|
16293
|
-
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
16294
17366
|
"type": {
|
|
16295
|
-
"
|
|
16296
|
-
"elementtype": {
|
|
16297
|
-
"primitive": "string"
|
|
16298
|
-
},
|
|
16299
|
-
"kind": "array"
|
|
16300
|
-
}
|
|
17367
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.MetadataConfiguration"
|
|
16301
17368
|
}
|
|
16302
17369
|
},
|
|
16303
17370
|
{
|
|
17371
|
+
"abstract": true,
|
|
16304
17372
|
"docs": {
|
|
16305
|
-
"
|
|
16306
|
-
"attribute": "true"
|
|
16307
|
-
},
|
|
17373
|
+
"default": "- Uses the deployment stage from the RestApi (restApi.deploymentStage.stageName)",
|
|
16308
17374
|
"stability": "experimental",
|
|
16309
|
-
"summary": "
|
|
17375
|
+
"summary": "The stage name of the REST API."
|
|
16310
17376
|
},
|
|
16311
17377
|
"immutable": true,
|
|
16312
17378
|
"locationInModule": {
|
|
16313
17379
|
"filename": "lib/gateway/targets/target.ts",
|
|
16314
|
-
"line":
|
|
17380
|
+
"line": 196
|
|
16315
17381
|
},
|
|
16316
|
-
"name": "
|
|
17382
|
+
"name": "stage",
|
|
16317
17383
|
"optional": true,
|
|
16318
|
-
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetBase",
|
|
16319
17384
|
"type": {
|
|
16320
17385
|
"primitive": "string"
|
|
16321
17386
|
}
|
|
16322
17387
|
}
|
|
16323
17388
|
],
|
|
16324
|
-
"symbolId": "lib/gateway/targets/target:
|
|
17389
|
+
"symbolId": "lib/gateway/targets/target:GatewayTargetApiGatewayProps"
|
|
16325
17390
|
},
|
|
16326
17391
|
"@aws-cdk/aws-bedrock-agentcore-alpha.GatewayTargetAttributes": {
|
|
16327
17392
|
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
@@ -16338,7 +17403,7 @@
|
|
|
16338
17403
|
"kind": "interface",
|
|
16339
17404
|
"locationInModule": {
|
|
16340
17405
|
"filename": "lib/gateway/targets/target.ts",
|
|
16341
|
-
"line":
|
|
17406
|
+
"line": 221
|
|
16342
17407
|
},
|
|
16343
17408
|
"name": "GatewayTargetAttributes",
|
|
16344
17409
|
"properties": [
|
|
@@ -16351,7 +17416,7 @@
|
|
|
16351
17416
|
"immutable": true,
|
|
16352
17417
|
"locationInModule": {
|
|
16353
17418
|
"filename": "lib/gateway/targets/target.ts",
|
|
16354
|
-
"line":
|
|
17419
|
+
"line": 240
|
|
16355
17420
|
},
|
|
16356
17421
|
"name": "gateway",
|
|
16357
17422
|
"type": {
|
|
@@ -16367,7 +17432,7 @@
|
|
|
16367
17432
|
"immutable": true,
|
|
16368
17433
|
"locationInModule": {
|
|
16369
17434
|
"filename": "lib/gateway/targets/target.ts",
|
|
16370
|
-
"line":
|
|
17435
|
+
"line": 235
|
|
16371
17436
|
},
|
|
16372
17437
|
"name": "gatewayTargetName",
|
|
16373
17438
|
"type": {
|
|
@@ -16383,7 +17448,7 @@
|
|
|
16383
17448
|
"immutable": true,
|
|
16384
17449
|
"locationInModule": {
|
|
16385
17450
|
"filename": "lib/gateway/targets/target.ts",
|
|
16386
|
-
"line":
|
|
17451
|
+
"line": 225
|
|
16387
17452
|
},
|
|
16388
17453
|
"name": "targetArn",
|
|
16389
17454
|
"type": {
|
|
@@ -16399,7 +17464,7 @@
|
|
|
16399
17464
|
"immutable": true,
|
|
16400
17465
|
"locationInModule": {
|
|
16401
17466
|
"filename": "lib/gateway/targets/target.ts",
|
|
16402
|
-
"line":
|
|
17467
|
+
"line": 230
|
|
16403
17468
|
},
|
|
16404
17469
|
"name": "targetId",
|
|
16405
17470
|
"type": {
|
|
@@ -16416,7 +17481,7 @@
|
|
|
16416
17481
|
"immutable": true,
|
|
16417
17482
|
"locationInModule": {
|
|
16418
17483
|
"filename": "lib/gateway/targets/target.ts",
|
|
16419
|
-
"line":
|
|
17484
|
+
"line": 252
|
|
16420
17485
|
},
|
|
16421
17486
|
"name": "createdAt",
|
|
16422
17487
|
"optional": true,
|
|
@@ -16434,7 +17499,7 @@
|
|
|
16434
17499
|
"immutable": true,
|
|
16435
17500
|
"locationInModule": {
|
|
16436
17501
|
"filename": "lib/gateway/targets/target.ts",
|
|
16437
|
-
"line":
|
|
17502
|
+
"line": 246
|
|
16438
17503
|
},
|
|
16439
17504
|
"name": "status",
|
|
16440
17505
|
"optional": true,
|
|
@@ -16452,7 +17517,7 @@
|
|
|
16452
17517
|
"immutable": true,
|
|
16453
17518
|
"locationInModule": {
|
|
16454
17519
|
"filename": "lib/gateway/targets/target.ts",
|
|
16455
|
-
"line":
|
|
17520
|
+
"line": 258
|
|
16456
17521
|
},
|
|
16457
17522
|
"name": "updatedAt",
|
|
16458
17523
|
"optional": true,
|
|
@@ -16509,7 +17574,7 @@
|
|
|
16509
17574
|
"kind": "class",
|
|
16510
17575
|
"locationInModule": {
|
|
16511
17576
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16512
|
-
"line":
|
|
17577
|
+
"line": 145
|
|
16513
17578
|
},
|
|
16514
17579
|
"methods": [
|
|
16515
17580
|
{
|
|
@@ -16520,7 +17585,7 @@
|
|
|
16520
17585
|
},
|
|
16521
17586
|
"locationInModule": {
|
|
16522
17587
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16523
|
-
"line":
|
|
17588
|
+
"line": 176
|
|
16524
17589
|
},
|
|
16525
17590
|
"name": "grant",
|
|
16526
17591
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16560,7 +17625,7 @@
|
|
|
16560
17625
|
},
|
|
16561
17626
|
"locationInModule": {
|
|
16562
17627
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16563
|
-
"line":
|
|
17628
|
+
"line": 210
|
|
16564
17629
|
},
|
|
16565
17630
|
"name": "grantManage",
|
|
16566
17631
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16589,7 +17654,7 @@
|
|
|
16589
17654
|
},
|
|
16590
17655
|
"locationInModule": {
|
|
16591
17656
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16592
|
-
"line":
|
|
17657
|
+
"line": 191
|
|
16593
17658
|
},
|
|
16594
17659
|
"name": "grantRead",
|
|
16595
17660
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16622,7 +17687,7 @@
|
|
|
16622
17687
|
"immutable": true,
|
|
16623
17688
|
"locationInModule": {
|
|
16624
17689
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16625
|
-
"line":
|
|
17690
|
+
"line": 150
|
|
16626
17691
|
},
|
|
16627
17692
|
"name": "gateway",
|
|
16628
17693
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16638,7 +17703,7 @@
|
|
|
16638
17703
|
"immutable": true,
|
|
16639
17704
|
"locationInModule": {
|
|
16640
17705
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16641
|
-
"line":
|
|
17706
|
+
"line": 161
|
|
16642
17707
|
},
|
|
16643
17708
|
"name": "gatewayTargetRef",
|
|
16644
17709
|
"overrides": "aws-cdk-lib.interfaces.aws_bedrockagentcore.IGatewayTargetRef",
|
|
@@ -16655,7 +17720,7 @@
|
|
|
16655
17720
|
"immutable": true,
|
|
16656
17721
|
"locationInModule": {
|
|
16657
17722
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16658
|
-
"line":
|
|
17723
|
+
"line": 148
|
|
16659
17724
|
},
|
|
16660
17725
|
"name": "name",
|
|
16661
17726
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16672,7 +17737,7 @@
|
|
|
16672
17737
|
"immutable": true,
|
|
16673
17738
|
"locationInModule": {
|
|
16674
17739
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16675
|
-
"line":
|
|
17740
|
+
"line": 146
|
|
16676
17741
|
},
|
|
16677
17742
|
"name": "targetArn",
|
|
16678
17743
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16689,7 +17754,7 @@
|
|
|
16689
17754
|
"immutable": true,
|
|
16690
17755
|
"locationInModule": {
|
|
16691
17756
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16692
|
-
"line":
|
|
17757
|
+
"line": 147
|
|
16693
17758
|
},
|
|
16694
17759
|
"name": "targetId",
|
|
16695
17760
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16706,7 +17771,7 @@
|
|
|
16706
17771
|
"immutable": true,
|
|
16707
17772
|
"locationInModule": {
|
|
16708
17773
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16709
|
-
"line":
|
|
17774
|
+
"line": 156
|
|
16710
17775
|
},
|
|
16711
17776
|
"name": "targetProtocolType",
|
|
16712
17777
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.IGatewayTarget",
|
|
@@ -16723,7 +17788,7 @@
|
|
|
16723
17788
|
"immutable": true,
|
|
16724
17789
|
"locationInModule": {
|
|
16725
17790
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16726
|
-
"line":
|
|
17791
|
+
"line": 154
|
|
16727
17792
|
},
|
|
16728
17793
|
"name": "createdAt",
|
|
16729
17794
|
"optional": true,
|
|
@@ -16741,7 +17806,7 @@
|
|
|
16741
17806
|
"immutable": true,
|
|
16742
17807
|
"locationInModule": {
|
|
16743
17808
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16744
|
-
"line":
|
|
17809
|
+
"line": 151
|
|
16745
17810
|
},
|
|
16746
17811
|
"name": "credentialProviderConfigurations",
|
|
16747
17812
|
"optional": true,
|
|
@@ -16764,7 +17829,7 @@
|
|
|
16764
17829
|
"immutable": true,
|
|
16765
17830
|
"locationInModule": {
|
|
16766
17831
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16767
|
-
"line":
|
|
17832
|
+
"line": 149
|
|
16768
17833
|
},
|
|
16769
17834
|
"name": "description",
|
|
16770
17835
|
"optional": true,
|
|
@@ -16782,7 +17847,7 @@
|
|
|
16782
17847
|
"immutable": true,
|
|
16783
17848
|
"locationInModule": {
|
|
16784
17849
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16785
|
-
"line":
|
|
17850
|
+
"line": 152
|
|
16786
17851
|
},
|
|
16787
17852
|
"name": "status",
|
|
16788
17853
|
"optional": true,
|
|
@@ -16800,7 +17865,7 @@
|
|
|
16800
17865
|
"immutable": true,
|
|
16801
17866
|
"locationInModule": {
|
|
16802
17867
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16803
|
-
"line":
|
|
17868
|
+
"line": 153
|
|
16804
17869
|
},
|
|
16805
17870
|
"name": "statusReasons",
|
|
16806
17871
|
"optional": true,
|
|
@@ -16823,7 +17888,7 @@
|
|
|
16823
17888
|
"immutable": true,
|
|
16824
17889
|
"locationInModule": {
|
|
16825
17890
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
16826
|
-
"line":
|
|
17891
|
+
"line": 155
|
|
16827
17892
|
},
|
|
16828
17893
|
"name": "updatedAt",
|
|
16829
17894
|
"optional": true,
|
|
@@ -16850,7 +17915,7 @@
|
|
|
16850
17915
|
"kind": "interface",
|
|
16851
17916
|
"locationInModule": {
|
|
16852
17917
|
"filename": "lib/gateway/targets/target.ts",
|
|
16853
|
-
"line":
|
|
17918
|
+
"line": 28
|
|
16854
17919
|
},
|
|
16855
17920
|
"name": "GatewayTargetCommonProps",
|
|
16856
17921
|
"properties": [
|
|
@@ -16864,7 +17929,7 @@
|
|
|
16864
17929
|
"immutable": true,
|
|
16865
17930
|
"locationInModule": {
|
|
16866
17931
|
"filename": "lib/gateway/targets/target.ts",
|
|
16867
|
-
"line":
|
|
17932
|
+
"line": 42
|
|
16868
17933
|
},
|
|
16869
17934
|
"name": "description",
|
|
16870
17935
|
"optional": true,
|
|
@@ -16882,7 +17947,7 @@
|
|
|
16882
17947
|
"immutable": true,
|
|
16883
17948
|
"locationInModule": {
|
|
16884
17949
|
"filename": "lib/gateway/targets/target.ts",
|
|
16885
|
-
"line":
|
|
17950
|
+
"line": 35
|
|
16886
17951
|
},
|
|
16887
17952
|
"name": "gatewayTargetName",
|
|
16888
17953
|
"optional": true,
|
|
@@ -16911,7 +17976,7 @@
|
|
|
16911
17976
|
"kind": "interface",
|
|
16912
17977
|
"locationInModule": {
|
|
16913
17978
|
"filename": "lib/gateway/targets/target.ts",
|
|
16914
|
-
"line":
|
|
17979
|
+
"line": 74
|
|
16915
17980
|
},
|
|
16916
17981
|
"name": "GatewayTargetLambdaProps",
|
|
16917
17982
|
"properties": [
|
|
@@ -16924,7 +17989,7 @@
|
|
|
16924
17989
|
"immutable": true,
|
|
16925
17990
|
"locationInModule": {
|
|
16926
17991
|
"filename": "lib/gateway/targets/target.ts",
|
|
16927
|
-
"line":
|
|
17992
|
+
"line": 78
|
|
16928
17993
|
},
|
|
16929
17994
|
"name": "gateway",
|
|
16930
17995
|
"type": {
|
|
@@ -16940,7 +18005,7 @@
|
|
|
16940
18005
|
"immutable": true,
|
|
16941
18006
|
"locationInModule": {
|
|
16942
18007
|
"filename": "lib/gateway/targets/target.ts",
|
|
16943
|
-
"line":
|
|
18008
|
+
"line": 83
|
|
16944
18009
|
},
|
|
16945
18010
|
"name": "lambdaFunction",
|
|
16946
18011
|
"type": {
|
|
@@ -16956,7 +18021,7 @@
|
|
|
16956
18021
|
"immutable": true,
|
|
16957
18022
|
"locationInModule": {
|
|
16958
18023
|
"filename": "lib/gateway/targets/target.ts",
|
|
16959
|
-
"line":
|
|
18024
|
+
"line": 88
|
|
16960
18025
|
},
|
|
16961
18026
|
"name": "toolSchema",
|
|
16962
18027
|
"type": {
|
|
@@ -16973,7 +18038,7 @@
|
|
|
16973
18038
|
"immutable": true,
|
|
16974
18039
|
"locationInModule": {
|
|
16975
18040
|
"filename": "lib/gateway/targets/target.ts",
|
|
16976
|
-
"line":
|
|
18041
|
+
"line": 95
|
|
16977
18042
|
},
|
|
16978
18043
|
"name": "credentialProviderConfigurations",
|
|
16979
18044
|
"optional": true,
|
|
@@ -17007,7 +18072,7 @@
|
|
|
17007
18072
|
"kind": "interface",
|
|
17008
18073
|
"locationInModule": {
|
|
17009
18074
|
"filename": "lib/gateway/targets/target.ts",
|
|
17010
|
-
"line":
|
|
18075
|
+
"line": 153
|
|
17011
18076
|
},
|
|
17012
18077
|
"name": "GatewayTargetMcpServerProps",
|
|
17013
18078
|
"properties": [
|
|
@@ -17020,7 +18085,7 @@
|
|
|
17020
18085
|
"immutable": true,
|
|
17021
18086
|
"locationInModule": {
|
|
17022
18087
|
"filename": "lib/gateway/targets/target.ts",
|
|
17023
|
-
"line":
|
|
18088
|
+
"line": 172
|
|
17024
18089
|
},
|
|
17025
18090
|
"name": "credentialProviderConfigurations",
|
|
17026
18091
|
"type": {
|
|
@@ -17042,7 +18107,7 @@
|
|
|
17042
18107
|
"immutable": true,
|
|
17043
18108
|
"locationInModule": {
|
|
17044
18109
|
"filename": "lib/gateway/targets/target.ts",
|
|
17045
|
-
"line":
|
|
18110
|
+
"line": 167
|
|
17046
18111
|
},
|
|
17047
18112
|
"name": "endpoint",
|
|
17048
18113
|
"type": {
|
|
@@ -17058,7 +18123,7 @@
|
|
|
17058
18123
|
"immutable": true,
|
|
17059
18124
|
"locationInModule": {
|
|
17060
18125
|
"filename": "lib/gateway/targets/target.ts",
|
|
17061
|
-
"line":
|
|
18126
|
+
"line": 157
|
|
17062
18127
|
},
|
|
17063
18128
|
"name": "gateway",
|
|
17064
18129
|
"type": {
|
|
@@ -17086,7 +18151,7 @@
|
|
|
17086
18151
|
"kind": "interface",
|
|
17087
18152
|
"locationInModule": {
|
|
17088
18153
|
"filename": "lib/gateway/targets/target.ts",
|
|
17089
|
-
"line":
|
|
18154
|
+
"line": 101
|
|
17090
18155
|
},
|
|
17091
18156
|
"name": "GatewayTargetOpenApiProps",
|
|
17092
18157
|
"properties": [
|
|
@@ -17099,7 +18164,7 @@
|
|
|
17099
18164
|
"immutable": true,
|
|
17100
18165
|
"locationInModule": {
|
|
17101
18166
|
"filename": "lib/gateway/targets/target.ts",
|
|
17102
|
-
"line":
|
|
18167
|
+
"line": 110
|
|
17103
18168
|
},
|
|
17104
18169
|
"name": "apiSchema",
|
|
17105
18170
|
"type": {
|
|
@@ -17115,7 +18180,7 @@
|
|
|
17115
18180
|
"immutable": true,
|
|
17116
18181
|
"locationInModule": {
|
|
17117
18182
|
"filename": "lib/gateway/targets/target.ts",
|
|
17118
|
-
"line":
|
|
18183
|
+
"line": 105
|
|
17119
18184
|
},
|
|
17120
18185
|
"name": "gateway",
|
|
17121
18186
|
"type": {
|
|
@@ -17132,7 +18197,7 @@
|
|
|
17132
18197
|
"immutable": true,
|
|
17133
18198
|
"locationInModule": {
|
|
17134
18199
|
"filename": "lib/gateway/targets/target.ts",
|
|
17135
|
-
"line":
|
|
18200
|
+
"line": 125
|
|
17136
18201
|
},
|
|
17137
18202
|
"name": "credentialProviderConfigurations",
|
|
17138
18203
|
"optional": true,
|
|
@@ -17156,7 +18221,7 @@
|
|
|
17156
18221
|
"immutable": true,
|
|
17157
18222
|
"locationInModule": {
|
|
17158
18223
|
"filename": "lib/gateway/targets/target.ts",
|
|
17159
|
-
"line":
|
|
18224
|
+
"line": 118
|
|
17160
18225
|
},
|
|
17161
18226
|
"name": "validateOpenApiSchema",
|
|
17162
18227
|
"optional": true,
|
|
@@ -17185,7 +18250,7 @@
|
|
|
17185
18250
|
"kind": "interface",
|
|
17186
18251
|
"locationInModule": {
|
|
17187
18252
|
"filename": "lib/gateway/targets/target.ts",
|
|
17188
|
-
"line":
|
|
18253
|
+
"line": 48
|
|
17189
18254
|
},
|
|
17190
18255
|
"name": "GatewayTargetProps",
|
|
17191
18256
|
"properties": [
|
|
@@ -17198,7 +18263,7 @@
|
|
|
17198
18263
|
"immutable": true,
|
|
17199
18264
|
"locationInModule": {
|
|
17200
18265
|
"filename": "lib/gateway/targets/target.ts",
|
|
17201
|
-
"line":
|
|
18266
|
+
"line": 52
|
|
17202
18267
|
},
|
|
17203
18268
|
"name": "gateway",
|
|
17204
18269
|
"type": {
|
|
@@ -17214,7 +18279,7 @@
|
|
|
17214
18279
|
"immutable": true,
|
|
17215
18280
|
"locationInModule": {
|
|
17216
18281
|
"filename": "lib/gateway/targets/target.ts",
|
|
17217
|
-
"line":
|
|
18282
|
+
"line": 61
|
|
17218
18283
|
},
|
|
17219
18284
|
"name": "targetConfiguration",
|
|
17220
18285
|
"type": {
|
|
@@ -17231,7 +18296,7 @@
|
|
|
17231
18296
|
"immutable": true,
|
|
17232
18297
|
"locationInModule": {
|
|
17233
18298
|
"filename": "lib/gateway/targets/target.ts",
|
|
17234
|
-
"line":
|
|
18299
|
+
"line": 67
|
|
17235
18300
|
},
|
|
17236
18301
|
"name": "credentialProviderConfigurations",
|
|
17237
18302
|
"optional": true,
|
|
@@ -17289,7 +18354,7 @@
|
|
|
17289
18354
|
"kind": "interface",
|
|
17290
18355
|
"locationInModule": {
|
|
17291
18356
|
"filename": "lib/gateway/targets/target.ts",
|
|
17292
|
-
"line":
|
|
18357
|
+
"line": 131
|
|
17293
18358
|
},
|
|
17294
18359
|
"name": "GatewayTargetSmithyProps",
|
|
17295
18360
|
"properties": [
|
|
@@ -17302,7 +18367,7 @@
|
|
|
17302
18367
|
"immutable": true,
|
|
17303
18368
|
"locationInModule": {
|
|
17304
18369
|
"filename": "lib/gateway/targets/target.ts",
|
|
17305
|
-
"line":
|
|
18370
|
+
"line": 135
|
|
17306
18371
|
},
|
|
17307
18372
|
"name": "gateway",
|
|
17308
18373
|
"type": {
|
|
@@ -17318,7 +18383,7 @@
|
|
|
17318
18383
|
"immutable": true,
|
|
17319
18384
|
"locationInModule": {
|
|
17320
18385
|
"filename": "lib/gateway/targets/target.ts",
|
|
17321
|
-
"line":
|
|
18386
|
+
"line": 140
|
|
17322
18387
|
},
|
|
17323
18388
|
"name": "smithyModel",
|
|
17324
18389
|
"type": {
|
|
@@ -17335,7 +18400,7 @@
|
|
|
17335
18400
|
"immutable": true,
|
|
17336
18401
|
"locationInModule": {
|
|
17337
18402
|
"filename": "lib/gateway/targets/target.ts",
|
|
17338
|
-
"line":
|
|
18403
|
+
"line": 147
|
|
17339
18404
|
},
|
|
17340
18405
|
"name": "credentialProviderConfigurations",
|
|
17341
18406
|
"optional": true,
|
|
@@ -19924,7 +20989,7 @@
|
|
|
19924
20989
|
"kind": "interface",
|
|
19925
20990
|
"locationInModule": {
|
|
19926
20991
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
19927
|
-
"line":
|
|
20992
|
+
"line": 45
|
|
19928
20993
|
},
|
|
19929
20994
|
"methods": [
|
|
19930
20995
|
{
|
|
@@ -19935,7 +21000,7 @@
|
|
|
19935
21000
|
},
|
|
19936
21001
|
"locationInModule": {
|
|
19937
21002
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
19938
|
-
"line":
|
|
21003
|
+
"line": 110
|
|
19939
21004
|
},
|
|
19940
21005
|
"name": "grant",
|
|
19941
21006
|
"parameters": [
|
|
@@ -19968,7 +21033,7 @@
|
|
|
19968
21033
|
},
|
|
19969
21034
|
"locationInModule": {
|
|
19970
21035
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
19971
|
-
"line":
|
|
21036
|
+
"line": 120
|
|
19972
21037
|
},
|
|
19973
21038
|
"name": "grantManage",
|
|
19974
21039
|
"parameters": [
|
|
@@ -19993,7 +21058,7 @@
|
|
|
19993
21058
|
},
|
|
19994
21059
|
"locationInModule": {
|
|
19995
21060
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
19996
|
-
"line":
|
|
21061
|
+
"line": 115
|
|
19997
21062
|
},
|
|
19998
21063
|
"name": "grantRead",
|
|
19999
21064
|
"parameters": [
|
|
@@ -20022,7 +21087,7 @@
|
|
|
20022
21087
|
"immutable": true,
|
|
20023
21088
|
"locationInModule": {
|
|
20024
21089
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20025
|
-
"line":
|
|
21090
|
+
"line": 71
|
|
20026
21091
|
},
|
|
20027
21092
|
"name": "gateway",
|
|
20028
21093
|
"type": {
|
|
@@ -20038,7 +21103,7 @@
|
|
|
20038
21103
|
"immutable": true,
|
|
20039
21104
|
"locationInModule": {
|
|
20040
21105
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20041
|
-
"line":
|
|
21106
|
+
"line": 61
|
|
20042
21107
|
},
|
|
20043
21108
|
"name": "name",
|
|
20044
21109
|
"type": {
|
|
@@ -20057,7 +21122,7 @@
|
|
|
20057
21122
|
"immutable": true,
|
|
20058
21123
|
"locationInModule": {
|
|
20059
21124
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20060
|
-
"line":
|
|
21125
|
+
"line": 50
|
|
20061
21126
|
},
|
|
20062
21127
|
"name": "targetArn",
|
|
20063
21128
|
"type": {
|
|
@@ -20076,7 +21141,7 @@
|
|
|
20076
21141
|
"immutable": true,
|
|
20077
21142
|
"locationInModule": {
|
|
20078
21143
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20079
|
-
"line":
|
|
21144
|
+
"line": 56
|
|
20080
21145
|
},
|
|
20081
21146
|
"name": "targetId",
|
|
20082
21147
|
"type": {
|
|
@@ -20092,7 +21157,7 @@
|
|
|
20092
21157
|
"immutable": true,
|
|
20093
21158
|
"locationInModule": {
|
|
20094
21159
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20095
|
-
"line":
|
|
21160
|
+
"line": 76
|
|
20096
21161
|
},
|
|
20097
21162
|
"name": "targetProtocolType",
|
|
20098
21163
|
"type": {
|
|
@@ -20111,7 +21176,7 @@
|
|
|
20111
21176
|
"immutable": true,
|
|
20112
21177
|
"locationInModule": {
|
|
20113
21178
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20114
|
-
"line":
|
|
21179
|
+
"line": 99
|
|
20115
21180
|
},
|
|
20116
21181
|
"name": "createdAt",
|
|
20117
21182
|
"optional": true,
|
|
@@ -20128,7 +21193,7 @@
|
|
|
20128
21193
|
"immutable": true,
|
|
20129
21194
|
"locationInModule": {
|
|
20130
21195
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20131
|
-
"line":
|
|
21196
|
+
"line": 81
|
|
20132
21197
|
},
|
|
20133
21198
|
"name": "credentialProviderConfigurations",
|
|
20134
21199
|
"optional": true,
|
|
@@ -20150,7 +21215,7 @@
|
|
|
20150
21215
|
"immutable": true,
|
|
20151
21216
|
"locationInModule": {
|
|
20152
21217
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20153
|
-
"line":
|
|
21218
|
+
"line": 66
|
|
20154
21219
|
},
|
|
20155
21220
|
"name": "description",
|
|
20156
21221
|
"optional": true,
|
|
@@ -20170,7 +21235,7 @@
|
|
|
20170
21235
|
"immutable": true,
|
|
20171
21236
|
"locationInModule": {
|
|
20172
21237
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20173
|
-
"line":
|
|
21238
|
+
"line": 87
|
|
20174
21239
|
},
|
|
20175
21240
|
"name": "status",
|
|
20176
21241
|
"optional": true,
|
|
@@ -20190,7 +21255,7 @@
|
|
|
20190
21255
|
"immutable": true,
|
|
20191
21256
|
"locationInModule": {
|
|
20192
21257
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20193
|
-
"line":
|
|
21258
|
+
"line": 93
|
|
20194
21259
|
},
|
|
20195
21260
|
"name": "statusReasons",
|
|
20196
21261
|
"optional": true,
|
|
@@ -20215,7 +21280,7 @@
|
|
|
20215
21280
|
"immutable": true,
|
|
20216
21281
|
"locationInModule": {
|
|
20217
21282
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20218
|
-
"line":
|
|
21283
|
+
"line": 105
|
|
20219
21284
|
},
|
|
20220
21285
|
"name": "updatedAt",
|
|
20221
21286
|
"optional": true,
|
|
@@ -20315,7 +21380,7 @@
|
|
|
20315
21380
|
"kind": "interface",
|
|
20316
21381
|
"locationInModule": {
|
|
20317
21382
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20318
|
-
"line":
|
|
21383
|
+
"line": 129
|
|
20319
21384
|
},
|
|
20320
21385
|
"name": "IMcpGatewayTarget",
|
|
20321
21386
|
"properties": [
|
|
@@ -20328,7 +21393,7 @@
|
|
|
20328
21393
|
"immutable": true,
|
|
20329
21394
|
"locationInModule": {
|
|
20330
21395
|
"filename": "lib/gateway/targets/target-base.ts",
|
|
20331
|
-
"line":
|
|
21396
|
+
"line": 133
|
|
20332
21397
|
},
|
|
20333
21398
|
"name": "targetType",
|
|
20334
21399
|
"type": {
|
|
@@ -21254,7 +22319,7 @@
|
|
|
21254
22319
|
"kind": "interface",
|
|
21255
22320
|
"locationInModule": {
|
|
21256
22321
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21257
|
-
"line":
|
|
22322
|
+
"line": 31
|
|
21258
22323
|
},
|
|
21259
22324
|
"methods": [
|
|
21260
22325
|
{
|
|
@@ -21265,7 +22330,7 @@
|
|
|
21265
22330
|
},
|
|
21266
22331
|
"locationInModule": {
|
|
21267
22332
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21268
|
-
"line":
|
|
22333
|
+
"line": 41
|
|
21269
22334
|
},
|
|
21270
22335
|
"name": "bind",
|
|
21271
22336
|
"parameters": [
|
|
@@ -21300,7 +22365,7 @@
|
|
|
21300
22365
|
"immutable": true,
|
|
21301
22366
|
"locationInModule": {
|
|
21302
22367
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21303
|
-
"line":
|
|
22368
|
+
"line": 35
|
|
21304
22369
|
},
|
|
21305
22370
|
"name": "targetType",
|
|
21306
22371
|
"type": {
|
|
@@ -21866,7 +22931,7 @@
|
|
|
21866
22931
|
},
|
|
21867
22932
|
"locationInModule": {
|
|
21868
22933
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21869
|
-
"line":
|
|
22934
|
+
"line": 123
|
|
21870
22935
|
},
|
|
21871
22936
|
"parameters": [
|
|
21872
22937
|
{
|
|
@@ -21886,7 +22951,7 @@
|
|
|
21886
22951
|
"kind": "class",
|
|
21887
22952
|
"locationInModule": {
|
|
21888
22953
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21889
|
-
"line":
|
|
22954
|
+
"line": 96
|
|
21890
22955
|
},
|
|
21891
22956
|
"methods": [
|
|
21892
22957
|
{
|
|
@@ -21897,7 +22962,7 @@
|
|
|
21897
22962
|
},
|
|
21898
22963
|
"locationInModule": {
|
|
21899
22964
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21900
|
-
"line":
|
|
22965
|
+
"line": 104
|
|
21901
22966
|
},
|
|
21902
22967
|
"name": "create",
|
|
21903
22968
|
"parameters": [
|
|
@@ -21934,7 +22999,7 @@
|
|
|
21934
22999
|
},
|
|
21935
23000
|
"locationInModule": {
|
|
21936
23001
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21937
|
-
"line":
|
|
23002
|
+
"line": 136
|
|
21938
23003
|
},
|
|
21939
23004
|
"name": "bind",
|
|
21940
23005
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -21971,7 +23036,7 @@
|
|
|
21971
23036
|
},
|
|
21972
23037
|
"locationInModule": {
|
|
21973
23038
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21974
|
-
"line":
|
|
23039
|
+
"line": 149
|
|
21975
23040
|
},
|
|
21976
23041
|
"name": "renderMcpConfiguration",
|
|
21977
23042
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -21993,7 +23058,7 @@
|
|
|
21993
23058
|
"immutable": true,
|
|
21994
23059
|
"locationInModule": {
|
|
21995
23060
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
21996
|
-
"line":
|
|
23061
|
+
"line": 116
|
|
21997
23062
|
},
|
|
21998
23063
|
"name": "lambdaFunction",
|
|
21999
23064
|
"type": {
|
|
@@ -22008,7 +23073,7 @@
|
|
|
22008
23073
|
"immutable": true,
|
|
22009
23074
|
"locationInModule": {
|
|
22010
23075
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22011
|
-
"line":
|
|
23076
|
+
"line": 111
|
|
22012
23077
|
},
|
|
22013
23078
|
"name": "targetType",
|
|
22014
23079
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -22024,7 +23089,7 @@
|
|
|
22024
23089
|
"immutable": true,
|
|
22025
23090
|
"locationInModule": {
|
|
22026
23091
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22027
|
-
"line":
|
|
23092
|
+
"line": 121
|
|
22028
23093
|
},
|
|
22029
23094
|
"name": "toolSchema",
|
|
22030
23095
|
"type": {
|
|
@@ -22701,7 +23766,7 @@
|
|
|
22701
23766
|
},
|
|
22702
23767
|
"locationInModule": {
|
|
22703
23768
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22704
|
-
"line":
|
|
23769
|
+
"line": 347
|
|
22705
23770
|
},
|
|
22706
23771
|
"parameters": [
|
|
22707
23772
|
{
|
|
@@ -22715,7 +23780,7 @@
|
|
|
22715
23780
|
"kind": "class",
|
|
22716
23781
|
"locationInModule": {
|
|
22717
23782
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22718
|
-
"line":
|
|
23783
|
+
"line": 329
|
|
22719
23784
|
},
|
|
22720
23785
|
"methods": [
|
|
22721
23786
|
{
|
|
@@ -22726,7 +23791,7 @@
|
|
|
22726
23791
|
},
|
|
22727
23792
|
"locationInModule": {
|
|
22728
23793
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22729
|
-
"line":
|
|
23794
|
+
"line": 336
|
|
22730
23795
|
},
|
|
22731
23796
|
"name": "create",
|
|
22732
23797
|
"parameters": [
|
|
@@ -22754,7 +23819,7 @@
|
|
|
22754
23819
|
},
|
|
22755
23820
|
"locationInModule": {
|
|
22756
23821
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22757
|
-
"line":
|
|
23822
|
+
"line": 360
|
|
22758
23823
|
},
|
|
22759
23824
|
"name": "bind",
|
|
22760
23825
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -22791,7 +23856,7 @@
|
|
|
22791
23856
|
},
|
|
22792
23857
|
"locationInModule": {
|
|
22793
23858
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22794
|
-
"line":
|
|
23859
|
+
"line": 369
|
|
22795
23860
|
},
|
|
22796
23861
|
"name": "renderMcpConfiguration",
|
|
22797
23862
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -22813,7 +23878,7 @@
|
|
|
22813
23878
|
"immutable": true,
|
|
22814
23879
|
"locationInModule": {
|
|
22815
23880
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22816
|
-
"line":
|
|
23881
|
+
"line": 345
|
|
22817
23882
|
},
|
|
22818
23883
|
"name": "endpoint",
|
|
22819
23884
|
"type": {
|
|
@@ -22828,7 +23893,7 @@
|
|
|
22828
23893
|
"immutable": true,
|
|
22829
23894
|
"locationInModule": {
|
|
22830
23895
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22831
|
-
"line":
|
|
23896
|
+
"line": 340
|
|
22832
23897
|
},
|
|
22833
23898
|
"name": "targetType",
|
|
22834
23899
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -22858,7 +23923,7 @@
|
|
|
22858
23923
|
"kind": "class",
|
|
22859
23924
|
"locationInModule": {
|
|
22860
23925
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22861
|
-
"line":
|
|
23926
|
+
"line": 58
|
|
22862
23927
|
},
|
|
22863
23928
|
"methods": [
|
|
22864
23929
|
{
|
|
@@ -22869,7 +23934,7 @@
|
|
|
22869
23934
|
},
|
|
22870
23935
|
"locationInModule": {
|
|
22871
23936
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22872
|
-
"line":
|
|
23937
|
+
"line": 68
|
|
22873
23938
|
},
|
|
22874
23939
|
"name": "bind",
|
|
22875
23940
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.ITargetConfiguration",
|
|
@@ -22901,7 +23966,7 @@
|
|
|
22901
23966
|
},
|
|
22902
23967
|
"locationInModule": {
|
|
22903
23968
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22904
|
-
"line":
|
|
23969
|
+
"line": 73
|
|
22905
23970
|
},
|
|
22906
23971
|
"name": "renderMcpConfiguration",
|
|
22907
23972
|
"protected": true,
|
|
@@ -22923,7 +23988,7 @@
|
|
|
22923
23988
|
"immutable": true,
|
|
22924
23989
|
"locationInModule": {
|
|
22925
23990
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
22926
|
-
"line":
|
|
23991
|
+
"line": 62
|
|
22927
23992
|
},
|
|
22928
23993
|
"name": "targetType",
|
|
22929
23994
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.ITargetConfiguration",
|
|
@@ -22974,6 +24039,13 @@
|
|
|
22974
24039
|
"summary": "MCP server target type."
|
|
22975
24040
|
},
|
|
22976
24041
|
"name": "MCP_SERVER"
|
|
24042
|
+
},
|
|
24043
|
+
{
|
|
24044
|
+
"docs": {
|
|
24045
|
+
"stability": "experimental",
|
|
24046
|
+
"summary": "API Gateway target type."
|
|
24047
|
+
},
|
|
24048
|
+
"name": "API_GATEWAY"
|
|
22977
24049
|
}
|
|
22978
24050
|
],
|
|
22979
24051
|
"name": "McpTargetType",
|
|
@@ -24788,6 +25860,100 @@
|
|
|
24788
25860
|
"name": "MemoryStrategyType",
|
|
24789
25861
|
"symbolId": "lib/memory/memory-strategy:MemoryStrategyType"
|
|
24790
25862
|
},
|
|
25863
|
+
"@aws-cdk/aws-bedrock-agentcore-alpha.MetadataConfiguration": {
|
|
25864
|
+
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
25865
|
+
"datatype": true,
|
|
25866
|
+
"docs": {
|
|
25867
|
+
"stability": "experimental",
|
|
25868
|
+
"summary": "Configuration for passing metadata (headers and query parameters) to the API Gateway target.",
|
|
25869
|
+
"example": "const gateway = new agentcore.Gateway(this, \"MyGateway\", {\n gatewayName: \"my-gateway\",\n});\n\nconst api = new apigateway.RestApi(this, 'MyApi', {\n restApiName: 'my-api',\n});\n\n// Create a gateway target using the static factory method\nconst apiGatewayTarget = agentcore.GatewayTarget.forApiGateway(this, \"MyApiGatewayTarget\", {\n gatewayTargetName: \"my-api-gateway-target\",\n description: \"Target for API Gateway REST API integration\",\n gateway: gateway,\n restApi: api,\n apiGatewayToolConfiguration: {\n toolFilters: [\n {\n filterPath: \"/pets/*\",\n methods: [agentcore.ApiGatewayHttpMethod.GET, agentcore.ApiGatewayHttpMethod.POST],\n },\n ],\n },\n metadataConfiguration: {\n allowedRequestHeaders: [\"X-User-Id\"],\n allowedQueryParameters: [\"limit\"],\n },\n});",
|
|
25870
|
+
"custom": {
|
|
25871
|
+
"exampleMetadata": "fixture=default infused"
|
|
25872
|
+
}
|
|
25873
|
+
},
|
|
25874
|
+
"fqn": "@aws-cdk/aws-bedrock-agentcore-alpha.MetadataConfiguration",
|
|
25875
|
+
"kind": "interface",
|
|
25876
|
+
"locationInModule": {
|
|
25877
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25878
|
+
"line": 497
|
|
25879
|
+
},
|
|
25880
|
+
"name": "MetadataConfiguration",
|
|
25881
|
+
"properties": [
|
|
25882
|
+
{
|
|
25883
|
+
"abstract": true,
|
|
25884
|
+
"docs": {
|
|
25885
|
+
"default": "- No query parameters are passed through",
|
|
25886
|
+
"remarks": "Constraints:\n- Array must contain 1-10 items\n- Each parameter name must be 1-40 characters\n- Cannot be an empty array",
|
|
25887
|
+
"stability": "experimental",
|
|
25888
|
+
"summary": "List of query parameter names to pass through to the target."
|
|
25889
|
+
},
|
|
25890
|
+
"immutable": true,
|
|
25891
|
+
"locationInModule": {
|
|
25892
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25893
|
+
"line": 508
|
|
25894
|
+
},
|
|
25895
|
+
"name": "allowedQueryParameters",
|
|
25896
|
+
"optional": true,
|
|
25897
|
+
"type": {
|
|
25898
|
+
"collection": {
|
|
25899
|
+
"elementtype": {
|
|
25900
|
+
"primitive": "string"
|
|
25901
|
+
},
|
|
25902
|
+
"kind": "array"
|
|
25903
|
+
}
|
|
25904
|
+
}
|
|
25905
|
+
},
|
|
25906
|
+
{
|
|
25907
|
+
"abstract": true,
|
|
25908
|
+
"docs": {
|
|
25909
|
+
"default": "- No request headers are passed through",
|
|
25910
|
+
"remarks": "Constraints:\n- Array must contain 1-10 items\n- Each header name must be 1-100 characters\n- Cannot be an empty array",
|
|
25911
|
+
"stability": "experimental",
|
|
25912
|
+
"summary": "List of request header names to pass through to the target."
|
|
25913
|
+
},
|
|
25914
|
+
"immutable": true,
|
|
25915
|
+
"locationInModule": {
|
|
25916
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25917
|
+
"line": 520
|
|
25918
|
+
},
|
|
25919
|
+
"name": "allowedRequestHeaders",
|
|
25920
|
+
"optional": true,
|
|
25921
|
+
"type": {
|
|
25922
|
+
"collection": {
|
|
25923
|
+
"elementtype": {
|
|
25924
|
+
"primitive": "string"
|
|
25925
|
+
},
|
|
25926
|
+
"kind": "array"
|
|
25927
|
+
}
|
|
25928
|
+
}
|
|
25929
|
+
},
|
|
25930
|
+
{
|
|
25931
|
+
"abstract": true,
|
|
25932
|
+
"docs": {
|
|
25933
|
+
"default": "- No response headers are passed through",
|
|
25934
|
+
"remarks": "Constraints:\n- Array must contain 1-10 items\n- Each header name must be 1-100 characters\n- Cannot be an empty array",
|
|
25935
|
+
"stability": "experimental",
|
|
25936
|
+
"summary": "List of response header names to pass through from the target."
|
|
25937
|
+
},
|
|
25938
|
+
"immutable": true,
|
|
25939
|
+
"locationInModule": {
|
|
25940
|
+
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25941
|
+
"line": 532
|
|
25942
|
+
},
|
|
25943
|
+
"name": "allowedResponseHeaders",
|
|
25944
|
+
"optional": true,
|
|
25945
|
+
"type": {
|
|
25946
|
+
"collection": {
|
|
25947
|
+
"elementtype": {
|
|
25948
|
+
"primitive": "string"
|
|
25949
|
+
},
|
|
25950
|
+
"kind": "array"
|
|
25951
|
+
}
|
|
25952
|
+
}
|
|
25953
|
+
}
|
|
25954
|
+
],
|
|
25955
|
+
"symbolId": "lib/gateway/targets/target-configuration:MetadataConfiguration"
|
|
25956
|
+
},
|
|
24791
25957
|
"@aws-cdk/aws-bedrock-agentcore-alpha.NetworkConfiguration": {
|
|
24792
25958
|
"abstract": true,
|
|
24793
25959
|
"assembly": "@aws-cdk/aws-bedrock-agentcore-alpha",
|
|
@@ -25026,7 +26192,7 @@
|
|
|
25026
26192
|
},
|
|
25027
26193
|
"locationInModule": {
|
|
25028
26194
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25029
|
-
"line":
|
|
26195
|
+
"line": 193
|
|
25030
26196
|
},
|
|
25031
26197
|
"parameters": [
|
|
25032
26198
|
{
|
|
@@ -25047,7 +26213,7 @@
|
|
|
25047
26213
|
"kind": "class",
|
|
25048
26214
|
"locationInModule": {
|
|
25049
26215
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25050
|
-
"line":
|
|
26216
|
+
"line": 169
|
|
25051
26217
|
},
|
|
25052
26218
|
"methods": [
|
|
25053
26219
|
{
|
|
@@ -25058,7 +26224,7 @@
|
|
|
25058
26224
|
},
|
|
25059
26225
|
"locationInModule": {
|
|
25060
26226
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25061
|
-
"line":
|
|
26227
|
+
"line": 177
|
|
25062
26228
|
},
|
|
25063
26229
|
"name": "create",
|
|
25064
26230
|
"parameters": [
|
|
@@ -25096,7 +26262,7 @@
|
|
|
25096
26262
|
},
|
|
25097
26263
|
"locationInModule": {
|
|
25098
26264
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25099
|
-
"line":
|
|
26265
|
+
"line": 206
|
|
25100
26266
|
},
|
|
25101
26267
|
"name": "bind",
|
|
25102
26268
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -25133,7 +26299,7 @@
|
|
|
25133
26299
|
},
|
|
25134
26300
|
"locationInModule": {
|
|
25135
26301
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25136
|
-
"line":
|
|
26302
|
+
"line": 251
|
|
25137
26303
|
},
|
|
25138
26304
|
"name": "renderMcpConfiguration",
|
|
25139
26305
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -25155,7 +26321,7 @@
|
|
|
25155
26321
|
"immutable": true,
|
|
25156
26322
|
"locationInModule": {
|
|
25157
26323
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25158
|
-
"line":
|
|
26324
|
+
"line": 186
|
|
25159
26325
|
},
|
|
25160
26326
|
"name": "apiSchema",
|
|
25161
26327
|
"type": {
|
|
@@ -25170,7 +26336,7 @@
|
|
|
25170
26336
|
"immutable": true,
|
|
25171
26337
|
"locationInModule": {
|
|
25172
26338
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
25173
|
-
"line":
|
|
26339
|
+
"line": 181
|
|
25174
26340
|
},
|
|
25175
26341
|
"name": "targetType",
|
|
25176
26342
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -28763,7 +29929,7 @@
|
|
|
28763
29929
|
},
|
|
28764
29930
|
"locationInModule": {
|
|
28765
29931
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28766
|
-
"line":
|
|
29932
|
+
"line": 286
|
|
28767
29933
|
},
|
|
28768
29934
|
"parameters": [
|
|
28769
29935
|
{
|
|
@@ -28777,7 +29943,7 @@
|
|
|
28777
29943
|
"kind": "class",
|
|
28778
29944
|
"locationInModule": {
|
|
28779
29945
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28780
|
-
"line":
|
|
29946
|
+
"line": 268
|
|
28781
29947
|
},
|
|
28782
29948
|
"methods": [
|
|
28783
29949
|
{
|
|
@@ -28788,7 +29954,7 @@
|
|
|
28788
29954
|
},
|
|
28789
29955
|
"locationInModule": {
|
|
28790
29956
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28791
|
-
"line":
|
|
29957
|
+
"line": 275
|
|
28792
29958
|
},
|
|
28793
29959
|
"name": "create",
|
|
28794
29960
|
"parameters": [
|
|
@@ -28816,7 +29982,7 @@
|
|
|
28816
29982
|
},
|
|
28817
29983
|
"locationInModule": {
|
|
28818
29984
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28819
|
-
"line":
|
|
29985
|
+
"line": 298
|
|
28820
29986
|
},
|
|
28821
29987
|
"name": "bind",
|
|
28822
29988
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -28853,7 +30019,7 @@
|
|
|
28853
30019
|
},
|
|
28854
30020
|
"locationInModule": {
|
|
28855
30021
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28856
|
-
"line":
|
|
30022
|
+
"line": 310
|
|
28857
30023
|
},
|
|
28858
30024
|
"name": "renderMcpConfiguration",
|
|
28859
30025
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -28875,7 +30041,7 @@
|
|
|
28875
30041
|
"immutable": true,
|
|
28876
30042
|
"locationInModule": {
|
|
28877
30043
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28878
|
-
"line":
|
|
30044
|
+
"line": 284
|
|
28879
30045
|
},
|
|
28880
30046
|
"name": "smithyModel",
|
|
28881
30047
|
"type": {
|
|
@@ -28890,7 +30056,7 @@
|
|
|
28890
30056
|
"immutable": true,
|
|
28891
30057
|
"locationInModule": {
|
|
28892
30058
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28893
|
-
"line":
|
|
30059
|
+
"line": 279
|
|
28894
30060
|
},
|
|
28895
30061
|
"name": "targetType",
|
|
28896
30062
|
"overrides": "@aws-cdk/aws-bedrock-agentcore-alpha.McpTargetConfiguration",
|
|
@@ -28916,7 +30082,7 @@
|
|
|
28916
30082
|
"kind": "interface",
|
|
28917
30083
|
"locationInModule": {
|
|
28918
30084
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28919
|
-
"line":
|
|
30085
|
+
"line": 21
|
|
28920
30086
|
},
|
|
28921
30087
|
"name": "TargetConfigurationConfig",
|
|
28922
30088
|
"properties": [
|
|
@@ -28929,7 +30095,7 @@
|
|
|
28929
30095
|
"immutable": true,
|
|
28930
30096
|
"locationInModule": {
|
|
28931
30097
|
"filename": "lib/gateway/targets/target-configuration.ts",
|
|
28932
|
-
"line":
|
|
30098
|
+
"line": 25
|
|
28933
30099
|
},
|
|
28934
30100
|
"name": "bound",
|
|
28935
30101
|
"type": {
|
|
@@ -29476,6 +30642,6 @@
|
|
|
29476
30642
|
"symbolId": "lib/network/network-configuration:VpcConfigProps"
|
|
29477
30643
|
}
|
|
29478
30644
|
},
|
|
29479
|
-
"version": "2.
|
|
30645
|
+
"version": "2.240.0-alpha.0",
|
|
29480
30646
|
"fingerprint": "**********"
|
|
29481
30647
|
}
|