interface GatewayProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.GatewayProps |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#GatewayProps |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.GatewayProps |
Python | aws_cdk.aws_bedrock_agentcore_alpha.GatewayProps |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป GatewayProps |
Properties for defining a Gateway.
Example
const gateway = new agentcore.Gateway(this, "MyGateway", {
gatewayName: "my-gateway",
});
const lambdaFunction = new lambda.Function(this, "MyFunction", {
runtime: lambda.Runtime.NODEJS_22_X,
handler: "index.handler",
code: lambda.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
const target = agentcore.GatewayTarget.forLambda(this, "MyLambdaTarget", {
gatewayTargetName: "my-lambda-target",
description: "Target for Lambda function integration",
gateway: gateway,
lambdaFunction: lambdaFunction,
toolSchema: agentcore.ToolSchema.fromLocalAsset(
path.join(__dirname, "schemas", "my-tool-schema.json")
),
});
Properties
| Name | Type | Description |
|---|---|---|
| gateway | string | The name of the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen) The name must be unique within your account. |
| authorizer | IGateway | The authorizer configuration for the gateway. |
| description? | string | Optional description for the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters. |
| exception | Gateway | The verbosity of exception messages Use DEBUG mode to see granular exception messages from a Gateway. |
| kms | IKey | The AWS KMS key used to encrypt data associated with the gateway. |
| protocol | IGateway | The protocol configuration for the gateway. |
| role? | IRole | The IAM role that provides permissions for the gateway to access AWS services. |
| tags? | { [string]: string } | Tags for the gateway A list of key:value pairs of tags to apply to this Gateway resource. |
gatewayName
Type:
string
The name of the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen) The name must be unique within your account.
authorizerConfiguration?
Type:
IGateway
(optional, default: A default authorizer will be created using Cognito)
The authorizer configuration for the gateway.
description?
Type:
string
(optional, default: No description)
Optional description for the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.
exceptionLevel?
Type:
Gateway
(optional, default: Exception messages are sanitized for presentation to end users)
The verbosity of exception messages Use DEBUG mode to see granular exception messages from a Gateway.
kmsKey?
Type:
IKey
(optional, default: No encryption)
The AWS KMS key used to encrypt data associated with the gateway.
protocolConfiguration?
Type:
IGateway
(optional, default: A default protocol configuration will be created using MCP with following params
supportedVersions: [MCPProtocolVersion.MCP_2025_03_26],
searchType: McpGatewaySearchType.SEMANTIC,
instructions: "Default gateway to connect to external MCP tools",)
The protocol configuration for the gateway.
role?
Type:
IRole
(optional, default: A new role will be created)
The IAM role that provides permissions for the gateway to access AWS services.
tags?
Type:
{ [string]: string }
(optional, default: No tags)
Tags for the gateway A list of key:value pairs of tags to apply to this Gateway resource.

.NET
Go
Java
Python
TypeScript (