# LambdaTargetConfiguration

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.

Extends: [McpTargetConfiguration](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.McpTargetConfiguration.html) › LambdaTargetConfiguration
Implements: [ITargetConfiguration](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.ITargetConfiguration.html)
Obtainable from: LambdaTargetConfiguration.create

- Source: [`lib/gateway/targets/target-configuration.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/targets/target-configuration.ts#L102)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
import { aws_lambda as lambda } from 'aws-cdk-lib';

declare const function_: lambda.Function;
declare const toolSchema: bedrock_agentcore_alpha.ToolSchema;
const lambdaTargetConfiguration = new bedrock_agentcore_alpha.LambdaTargetConfiguration(function_, toolSchema);
```

Python:

```python
# 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)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;
import software.amazon.awscdk.services.lambda.*;

Function function_;
ToolSchema toolSchema;

LambdaTargetConfiguration lambdaTargetConfiguration = new LambdaTargetConfiguration(function_, toolSchema);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
using Amazon.CDK.AWS.Lambda;

Function function_;
ToolSchema toolSchema;

var lambdaTargetConfiguration = new LambdaTargetConfiguration(function_, toolSchema);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"
import "github.com/aws/aws-cdk-go/awscdk"

var function_ Function
var toolSchema ToolSchema

lambdaTargetConfiguration := bedrock_agentcore_alpha.NewLambdaTargetConfiguration(function_, toolSchema)
```

## Initializer

TypeScript:

```ts
new LambdaTargetConfiguration(lambdaFunction: IFunction, toolSchema: ToolSchema)
```

Python:

```python
LambdaTargetConfiguration(lambda_function: IFunction, tool_schema: ToolSchema)
```

Java:

```java
new LambdaTargetConfiguration(IFunction lambdaFunction, ToolSchema toolSchema)
```

C# / .NET:

```csharp
new LambdaTargetConfiguration(IFunction lambdaFunction, ToolSchema toolSchema)
```

Golang:

```go
NewLambdaTargetConfiguration(LambdaFunction IFunction, ToolSchema ToolSchema)
```

## Properties

- `lambdaFunction`: [IFunction](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IFunction.html) — The Lambda function that implements the MCP server logic.

- `targetType`: [McpTargetType](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.McpTargetType.html) — The target type.

- `toolSchema`: [ToolSchema](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.ToolSchema.html) — The tool schema that defines the available tools.

## Methods

- `bind(scope: Construct, gateway: IGateway): TargetConfigurationConfig` — Binds this configuration to a construct scope Sets up necessary permissions for the gateway to invoke the Lambda function.

  **Parameters**

  - `scope` — The construct scope.
  - `gateway` — The gateway that will use this target.

- `create(lambdaFunction: IFunction, toolSchema: ToolSchema): LambdaTargetConfiguration // chainable` (static) — Create a Lambda target configuration.

  **Parameters**

  - `lambdaFunction` — The Lambda function to invoke.
  - `toolSchema` — The schema defining the tools.

  **Returns:** A new LambdaTargetConfiguration instance
