LambdaTargetConfiguration

class aws_cdk.aws_bedrock_agentcore_alpha.LambdaTargetConfiguration(lambda_function, tool_schema)

Bases: McpTargetConfiguration

(experimental) Configuration for Lambda-based MCP targets.

This configuration wraps a Lambda function as MCP tools, allowing the gateway to invoke the function to provide tool capabilities.

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha
from aws_cdk import aws_lambda as lambda_

# function_: lambda.Function
# tool_schema: bedrock_agentcore_alpha.ToolSchema

lambda_target_configuration = bedrock_agentcore_alpha.LambdaTargetConfiguration(function_, tool_schema)
Parameters:
Stability:

experimental

Methods

bind(scope, gateway)

(experimental) Binds this configuration to a construct scope Sets up necessary permissions for the gateway to invoke the Lambda function.

Parameters:
  • scope (Construct) – The construct scope.

  • gateway (IGateway) – The gateway that will use this target.

Stability:

experimental

Return type:

TargetConfigurationConfig

Attributes

lambda_function

(experimental) The Lambda function that implements the MCP server logic.

Stability:

experimental

target_type

(experimental) The target type.

Stability:

experimental

tool_schema

(experimental) The tool schema that defines the available tools.

Stability:

experimental

Static Methods

classmethod create(lambda_function, tool_schema)

(experimental) Create a Lambda target configuration.

Parameters:
  • lambda_function (IFunction) – The Lambda function to invoke.

  • tool_schema (ToolSchema) – The schema defining the tools.

Return type:

LambdaTargetConfiguration

Returns:

A new LambdaTargetConfiguration instance

Stability:

experimental