Show / Hide Table of Contents

Class GatewayTargetLambdaProps

(experimental) Properties for creating a Lambda-based Gateway Target Convenience interface for the most common use case.

Inheritance
object
GatewayTargetLambdaProps
Implements
IGatewayTargetLambdaProps
IGatewayTargetCommonProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.dll
Syntax (csharp)
public class GatewayTargetLambdaProps : IGatewayTargetLambdaProps, IGatewayTargetCommonProps
Syntax (vb)
Public Class GatewayTargetLambdaProps Implements IGatewayTargetLambdaProps, IGatewayTargetCommonProps
Remarks

Stability: Experimental

ExampleMetadata: fixture=default infused

Examples
var gateway = new Gateway(this, "MyGateway", new GatewayProps {
                 GatewayName = "my-gateway"
             });

             var lambdaFunction = new Function(this, "MyFunction", new FunctionProps {
                 Runtime = Runtime.NODEJS_22_X,
                 Handler = "index.handler",
                 Code = Code.FromInline(@"
                         exports.handler = async (event) => {
                             return {
                                 statusCode: 200,
                                 body: JSON.stringify({ message: 'Hello from Lambda!' })
                             };
                         };
                     ")
             });

             // Create a gateway target with Lambda and tool schema
             var target = GatewayTarget.ForLambda(this, "MyLambdaTarget", new GatewayTargetLambdaProps {
                 GatewayTargetName = "my-lambda-target",
                 Description = "Target for Lambda function integration",
                 Gateway = gateway,
                 LambdaFunction = lambdaFunction,
                 ToolSchema = ToolSchema.FromLocalAsset(path.Join(__dirname, "schemas", "my-tool-schema.json"))
             });

Synopsis

Constructors

GatewayTargetLambdaProps()

(experimental) Properties for creating a Lambda-based Gateway Target Convenience interface for the most common use case.

Properties

CredentialProviderConfigurations

(experimental) Credential providers for authentication Lambda targets only support IAM role authentication.

Description

(experimental) Optional description for the gateway target The description can have up to 200 characters.

Gateway

(experimental) The gateway this target belongs to.

GatewayTargetName

(experimental) The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.

LambdaFunction

(experimental) The Lambda function to associate with this target.

ToolSchema

(experimental) The tool schema defining the available tools.

Constructors

GatewayTargetLambdaProps()

(experimental) Properties for creating a Lambda-based Gateway Target Convenience interface for the most common use case.

public GatewayTargetLambdaProps()
Remarks

Stability: Experimental

ExampleMetadata: fixture=default infused

Examples
var gateway = new Gateway(this, "MyGateway", new GatewayProps {
                 GatewayName = "my-gateway"
             });

             var lambdaFunction = new Function(this, "MyFunction", new FunctionProps {
                 Runtime = Runtime.NODEJS_22_X,
                 Handler = "index.handler",
                 Code = Code.FromInline(@"
                         exports.handler = async (event) => {
                             return {
                                 statusCode: 200,
                                 body: JSON.stringify({ message: 'Hello from Lambda!' })
                             };
                         };
                     ")
             });

             // Create a gateway target with Lambda and tool schema
             var target = GatewayTarget.ForLambda(this, "MyLambdaTarget", new GatewayTargetLambdaProps {
                 GatewayTargetName = "my-lambda-target",
                 Description = "Target for Lambda function integration",
                 Gateway = gateway,
                 LambdaFunction = lambdaFunction,
                 ToolSchema = ToolSchema.FromLocalAsset(path.Join(__dirname, "schemas", "my-tool-schema.json"))
             });

Properties

CredentialProviderConfigurations

(experimental) Credential providers for authentication Lambda targets only support IAM role authentication.

public ICredentialProviderConfig[]? CredentialProviderConfigurations { get; set; }
Property Value

ICredentialProviderConfig[]

Remarks

Default: - [GatewayCredentialProvider.fromIamRole()]

Stability: Experimental

Description

(experimental) Optional description for the gateway target The description can have up to 200 characters.

public string? Description { get; set; }
Property Value

string

Remarks

Default: - No description

Stability: Experimental

Gateway

(experimental) The gateway this target belongs to.

public IGateway Gateway { get; set; }
Property Value

IGateway

Remarks

Stability: Experimental

GatewayTargetName

(experimental) The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.

public string GatewayTargetName { get; set; }
Property Value

string

Remarks

Stability: Experimental

LambdaFunction

(experimental) The Lambda function to associate with this target.

public IFunction LambdaFunction { get; set; }
Property Value

IFunction

Remarks

Stability: Experimental

ToolSchema

(experimental) The tool schema defining the available tools.

public ToolSchema ToolSchema { get; set; }
Property Value

ToolSchema

Remarks

Stability: Experimental

Implements

IGatewayTargetLambdaProps
IGatewayTargetCommonProps
Back to top Generated by DocFX