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:
lambda_function (
IFunction)tool_schema (
ToolSchema)
- 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:
- Stability:
experimental
- Return type:
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:
- Returns:
A new LambdaTargetConfiguration instance
- Stability:
experimental