Skip to content
v2.277.0

Experimental

@aws-cdk/aws-bedrock-agentcore-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

RuntimeProps Struct ​

Properties for creating a Bedrock Agent Core Runtime resource.

Example ​

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 * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const agentRuntimeArtifact: bedrock_agentcore_alpha.AgentRuntimeArtifact;
declare const loggingDestination: bedrock_agentcore_alpha.LoggingDestination;
declare const logType: bedrock_agentcore_alpha.LogType;
declare const role: iam.Role;
declare const runtimeAuthorizerConfiguration: bedrock_agentcore_alpha.RuntimeAuthorizerConfiguration;
declare const runtimeNetworkConfiguration: bedrock_agentcore_alpha.RuntimeNetworkConfiguration;
const runtimeProps: bedrock_agentcore_alpha.RuntimeProps = {
  agentRuntimeArtifact: agentRuntimeArtifact,

  // the properties below are optional
  authorizerConfiguration: runtimeAuthorizerConfiguration,
  description: 'description',
  environmentVariables: {
    environmentVariablesKey: 'environmentVariables',
  },
  executionRole: role,
  lifecycleConfiguration: {
    idleRuntimeSessionTimeout: cdk.Duration.minutes(30),
    maxLifetime: cdk.Duration.minutes(30),
  },
  loggingConfigs: [{
    destination: loggingDestination,
    logType: logType,
  }],
  networkConfiguration: runtimeNetworkConfiguration,
  protocolConfiguration: bedrock_agentcore_alpha.ProtocolType.MCP,
  requestHeaderConfiguration: {
    allowlistedHeaders: ['allowlistedHeaders'],
  },
  runtimeName: 'runtimeName',
  tags: {
    tagsKey: 'tags',
  },
  tracingEnabled: false,
};
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
import aws_cdk as cdk
from aws_cdk import aws_iam as iam

# agent_runtime_artifact: bedrock_agentcore_alpha.AgentRuntimeArtifact
# logging_destination: bedrock_agentcore_alpha.LoggingDestination
# log_type: bedrock_agentcore_alpha.LogType
# role: iam.Role
# runtime_authorizer_configuration: bedrock_agentcore_alpha.RuntimeAuthorizerConfiguration
# runtime_network_configuration: bedrock_agentcore_alpha.RuntimeNetworkConfiguration

runtime_props = bedrock_agentcore_alpha.RuntimeProps(
    agent_runtime_artifact=agent_runtime_artifact,

    # the properties below are optional
    authorizer_configuration=runtime_authorizer_configuration,
    description="description",
    environment_variables={
        "environment_variables_key": "environmentVariables"
    },
    execution_role=role,
    lifecycle_configuration=bedrock_agentcore_alpha.LifecycleConfiguration(
        idle_runtime_session_timeout=cdk.Duration.minutes(30),
        max_lifetime=cdk.Duration.minutes(30)
    ),
    logging_configs=[bedrock_agentcore_alpha.LoggingConfig(
        destination=logging_destination,
        log_type=log_type
    )],
    network_configuration=runtime_network_configuration,
    protocol_configuration=bedrock_agentcore_alpha.ProtocolType.MCP,
    request_header_configuration=bedrock_agentcore_alpha.RequestHeaderConfiguration(
        allowlisted_headers=["allowlistedHeaders"]
    ),
    runtime_name="runtimeName",
    tags={
        "tags_key": "tags"
    },
    tracing_enabled=False
)
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.*;
import software.amazon.awscdk.services.iam.*;

AgentRuntimeArtifact agentRuntimeArtifact;
LoggingDestination loggingDestination;
LogType logType;
Role role;
RuntimeAuthorizerConfiguration runtimeAuthorizerConfiguration;
RuntimeNetworkConfiguration runtimeNetworkConfiguration;

RuntimeProps runtimeProps = RuntimeProps.builder()
        .agentRuntimeArtifact(agentRuntimeArtifact)

        // the properties below are optional
        .authorizerConfiguration(runtimeAuthorizerConfiguration)
        .description("description")
        .environmentVariables(Map.of(
                "environmentVariablesKey", "environmentVariables"))
        .executionRole(role)
        .lifecycleConfiguration(LifecycleConfiguration.builder()
                .idleRuntimeSessionTimeout(Duration.minutes(30))
                .maxLifetime(Duration.minutes(30))
                .build())
        .loggingConfigs(List.of(LoggingConfig.builder()
                .destination(loggingDestination)
                .logType(logType)
                .build()))
        .networkConfiguration(runtimeNetworkConfiguration)
        .protocolConfiguration(ProtocolType.MCP)
        .requestHeaderConfiguration(RequestHeaderConfiguration.builder()
                .allowlistedHeaders(List.of("allowlistedHeaders"))
                .build())
        .runtimeName("runtimeName")
        .tags(Map.of(
                "tagsKey", "tags"))
        .tracingEnabled(false)
        .build();
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;
using Amazon.CDK.AWS.IAM;

AgentRuntimeArtifact agentRuntimeArtifact;
LoggingDestination loggingDestination;
LogType logType;
Role role;
RuntimeAuthorizerConfiguration runtimeAuthorizerConfiguration;
RuntimeNetworkConfiguration runtimeNetworkConfiguration;

var runtimeProps = new RuntimeProps {
    AgentRuntimeArtifact = agentRuntimeArtifact,

    // the properties below are optional
    AuthorizerConfiguration = runtimeAuthorizerConfiguration,
    Description = "description",
    EnvironmentVariables = new Dictionary<string, string> {
        { "environmentVariablesKey", "environmentVariables" }
    },
    ExecutionRole = role,
    LifecycleConfiguration = new LifecycleConfiguration {
        IdleRuntimeSessionTimeout = Duration.Minutes(30),
        MaxLifetime = Duration.Minutes(30)
    },
    LoggingConfigs = new [] { new LoggingConfig {
        Destination = loggingDestination,
        LogType = logType
    } },
    NetworkConfiguration = runtimeNetworkConfiguration,
    ProtocolConfiguration = ProtocolType.MCP,
    RequestHeaderConfiguration = new RequestHeaderConfiguration {
        AllowlistedHeaders = new [] { "allowlistedHeaders" }
    },
    RuntimeName = "runtimeName",
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    },
    TracingEnabled = false
};
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"
import "github.com/aws/aws-cdk-go/awscdk"

var agentRuntimeArtifact AgentRuntimeArtifact
var loggingDestination LoggingDestination
var logType LogType
var role Role
var runtimeAuthorizerConfiguration RuntimeAuthorizerConfiguration
var runtimeNetworkConfiguration RuntimeNetworkConfiguration

runtimeProps := &RuntimeProps{
	AgentRuntimeArtifact: agentRuntimeArtifact,

	// the properties below are optional
	AuthorizerConfiguration: runtimeAuthorizerConfiguration,
	Description: jsii.String("description"),
	EnvironmentVariables: map[string]*string{
		"environmentVariablesKey": jsii.String("environmentVariables"),
	},
	ExecutionRole: role,
	LifecycleConfiguration: &LifecycleConfiguration{
		IdleRuntimeSessionTimeout: cdk.Duration_Minutes(jsii.Number(30)),
		MaxLifetime: cdk.Duration_*Minutes(jsii.Number(30)),
	},
	LoggingConfigs: []LoggingConfig{
		&LoggingConfig{
			Destination: loggingDestination,
			LogType: logType,
		},
	},
	NetworkConfiguration: runtimeNetworkConfiguration,
	ProtocolConfiguration: bedrock_agentcore_alpha.ProtocolType_MCP,
	RequestHeaderConfiguration: &RequestHeaderConfiguration{
		AllowlistedHeaders: []*string{
			jsii.String("allowlistedHeaders"),
		},
	},
	RuntimeName: jsii.String("runtimeName"),
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
	TracingEnabled: jsii.Boolean(false),
}

Properties ​

agentRuntimeArtifactAgentRuntimeArtifactagent_runtime_artifactAgentRuntimeArtifactagentRuntimeArtifactAgentRuntimeArtifactAgentRuntimeArtifactAgentRuntimeArtifactAgentRuntimeArtifactAgentRuntimeArtifactrequired#
The artifact configuration for the agent runtime Contains the container configuration with ECR URI.
authorizerConfigurationoptionalRuntimeAuthorizerConfigurationauthorizer_configurationoptionalRuntimeAuthorizerConfigurationauthorizerConfigurationoptionalRuntimeAuthorizerConfigurationAuthorizerConfigurationoptionalRuntimeAuthorizerConfigurationAuthorizerConfigurationoptionalRuntimeAuthorizerConfiguration#
Authorizer configuration for the agent runtime Use RuntimeAuthorizerConfiguration static methods to create the configuration.

Default: RuntimeAuthorizerConfiguration.iam() (IAM authentication)

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
Optional description for the agent runtime.

Default: No description Length Minimum: 1 , Maximum: 1200

environmentVariablesoptional{ [key: string]: string }environment_variablesoptionaltyping.Mapping[str, str]environmentVariablesoptionalMap<String, String>EnvironmentVariablesoptionalIDictionary<string, string>EnvironmentVariablesoptional*map[string]*string#
Environment variables for the agent runtime - Maximum 50 environment variables - Key: Must be 1-100 characters, start with letter or underscore, contain only letters, numbers, and underscores - Value: Must be 0-2048 characters (per CloudFormation specification).

Default: No environment variables

executionRoleoptionalIRoleexecution_roleoptionalIRoleexecutionRoleoptionalIRoleExecutionRoleoptionalIRoleExecutionRoleoptionalIRole#
The IAM role that provides permissions for the agent runtime If not provided, a role will be created automatically.

Default: A new role will be created

lifecycleConfigurationoptionalLifecycleConfigurationlifecycle_configurationoptionalLifecycleConfigurationlifecycleConfigurationoptionalLifecycleConfigurationLifecycleConfigurationoptionalLifecycleConfigurationLifecycleConfigurationoptionalLifecycleConfiguration#
The life cycle configuration for the AgentCore Runtime.

Default: No lifecycle configuration

loggingConfigsoptionalLoggingConfig[]logging_configsoptionaltyping.List[LoggingConfig]loggingConfigsoptionalList<LoggingConfig>LoggingConfigsoptionalLoggingConfig[]LoggingConfigsoptional*[]LoggingConfig#
Logging configuration for the runtime.

Default: No logging configured

Allows sending APPLICATION_LOGS and USAGE_LOGS to CloudWatch Logs, S3, or Kinesis Data Firehose.

networkConfigurationoptionalRuntimeNetworkConfigurationnetwork_configurationoptionalRuntimeNetworkConfigurationnetworkConfigurationoptionalRuntimeNetworkConfigurationNetworkConfigurationoptionalRuntimeNetworkConfigurationNetworkConfigurationoptionalRuntimeNetworkConfiguration#
Network configuration for the agent runtime.

Default: RuntimeNetworkConfiguration.usingPublicNetwork()

protocolConfigurationoptionalProtocolTypeprotocol_configurationoptionalProtocolTypeprotocolConfigurationoptionalProtocolTypeProtocolConfigurationoptionalProtocolTypeProtocolConfigurationoptionalProtocolType= ProtocolType.HTTP#
Protocol configuration for the agent runtime.
requestHeaderConfigurationoptionalRequestHeaderConfigurationrequest_header_configurationoptionalRequestHeaderConfigurationrequestHeaderConfigurationoptionalRequestHeaderConfigurationRequestHeaderConfigurationoptionalRequestHeaderConfigurationRequestHeaderConfigurationoptionalRequestHeaderConfiguration#
Configuration for HTTP request headers that will be passed through to the runtime.

Default: No request headers configured

runtimeNameoptionalstringruntime_nameoptionalstrruntimeNameoptionalStringRuntimeNameoptionalstringRuntimeNameoptional*string#
The name of the agent runtime Valid characters are a-z, A-Z, 0-9, _ (underscore) Must start with a letter and can be up to 48 characters long Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,47}$.

Default: auto generate

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
Tags for the agent runtime A list of key:value pairs of tags to apply to this Runtime resource.

Default: {} - no tags

tracingEnabledoptionalbooleantracing_enabledoptionalbooltracingEnabledoptionalBooleanTracingEnabledoptionalboolTracingEnabledoptional*bool= false#
Whether to enable X-Ray tracing for this runtime.

When enabled, traces will be delivered to AWS X-Ray.