GatewayTargetLambdaProps
- class aws_cdk.aws_bedrock_agentcore_alpha.GatewayTargetLambdaProps(*, gateway_target_name, description=None, gateway, lambda_function, tool_schema, credential_provider_configurations=None)
Bases:
GatewayTargetCommonProps(experimental) Properties for creating a Lambda-based Gateway Target Convenience interface for the most common use case.
- Parameters:
gateway_target_name (
str) – (experimental) The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.description (
Optional[str]) – (experimental) Optional description for the gateway target The description can have up to 200 characters. Default: - No descriptiongateway (
IGateway) – (experimental) The gateway this target belongs to.lambda_function (
IFunction) – (experimental) The Lambda function to associate with this target.tool_schema (
ToolSchema) – (experimental) The tool schema defining the available tools.credential_provider_configurations (
Optional[Sequence[ICredentialProviderConfig]]) – (experimental) Credential providers for authentication Lambda targets only support IAM role authentication. Default: - [GatewayCredentialProvider.fromIamRole()]
- Stability:
experimental
- ExampleMetadata:
fixture=default infused
Example:
gateway = agentcore.Gateway(self, "MyGateway", gateway_name="my-gateway" ) lambda_function = lambda_.Function(self, "MyFunction", runtime=lambda_.Runtime.NODEJS_22_X, handler="index.handler", code=lambda_.Code.from_inline(""" exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify({ message: 'Hello from Lambda!' }) }; }; """) ) # Create a gateway target with Lambda and tool schema target = agentcore.GatewayTarget.for_lambda(self, "MyLambdaTarget", gateway_target_name="my-lambda-target", description="Target for Lambda function integration", gateway=gateway, lambda_function=lambda_function, tool_schema=agentcore.ToolSchema.from_local_asset( path.join(__dirname, "schemas", "my-tool-schema.json")) )
Attributes
- credential_provider_configurations
(experimental) Credential providers for authentication Lambda targets only support IAM role authentication.
- Default:
[GatewayCredentialProvider.fromIamRole()]
- Stability:
experimental
- description
(experimental) Optional description for the gateway target The description can have up to 200 characters.
- Default:
No description
- Stability:
experimental
- gateway
(experimental) The gateway this target belongs to.
- Stability:
experimental
- gateway_target_name
^([0-9a-zA-Z][-]?){1,100}$.
- Stability:
experimental
- Type:
(experimental) The name of the gateway target The name must be unique within the gateway Pattern
- lambda_function
(experimental) The Lambda function to associate with this target.
- Stability:
experimental
- tool_schema
(experimental) The tool schema defining the available tools.
- Stability:
experimental