Interface GatewayTargetLambdaProps

All Superinterfaces:
GatewayTargetCommonProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
GatewayTargetLambdaProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.415Z") @Stability(Stable) public interface GatewayTargetLambdaProps extends software.amazon.jsii.JsiiSerializable, GatewayTargetCommonProps
Properties for creating a Lambda-based Gateway Target Convenience interface for the most common use case.

Example:

 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-gateway")
         .build();
 Function lambdaFunction = Function.Builder.create(this, "MyFunction")
         .runtime(Runtime.NODEJS_22_X)
         .handler("index.handler")
         .code(Code.fromInline("\n        exports.handler = async (event) => {\n            return {\n                statusCode: 200,\n                body: JSON.stringify({ message: 'Hello from Lambda!' })\n            };\n        };\n    "))
         .build();
 // Create a gateway target with Lambda and tool schema
 GatewayTarget target = GatewayTarget.forLambda(this, "MyLambdaTarget", GatewayTargetLambdaProps.builder()
         .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")))
         .build());
 
  • Method Details

    • getGateway

      @Stability(Stable) @NotNull IGateway getGateway()
      The gateway this target belongs to.
    • getLambdaFunction

      @Stability(Stable) @NotNull IFunction getLambdaFunction()
      The Lambda function to associate with this target.
    • getToolSchema

      @Stability(Stable) @NotNull ToolSchema getToolSchema()
      The tool schema defining the available tools.
    • getCredentialProviderConfigurations

      @Stability(Stable) @Nullable default List<ICredentialProviderConfig> getCredentialProviderConfigurations()
      Credential providers for authentication Lambda targets only support IAM role authentication.

      Default: - [GatewayCredentialProvider.fromIamRole()]

    • builder

      @Stability(Stable) static GatewayTargetLambdaProps.Builder builder()
      Returns:
      a GatewayTargetLambdaProps.Builder of GatewayTargetLambdaProps