LoggingDestination
- class aws_cdk.aws_bedrock_agentcore_alpha.LoggingDestination
Bases:
object(experimental) Represents a logging destination for AgentCore Runtime.
Use the static factory methods to create instances:
LoggingDestination.cloudWatchLogs(logGroup)- Send logs to CloudWatch LogsLoggingDestination.s3(bucket)- Send logs to S3LoggingDestination.firehose(stream)- Send logs to Kinesis Data Firehose
- Stability:
experimental
- ExampleMetadata:
fixture=default infused
Example:
repository = ecr.Repository(self, "TestRepository", repository_name="test-agent-runtime" ) agent_runtime_artifact = agentcore.AgentRuntimeArtifact.from_ecr_repository(repository, "v1.0.0") # Create logging destinations log_group = logs.LogGroup(self, "RuntimeLogGroup") log_bucket = s3.Bucket(self, "RuntimeLogBucket") firehose_stream = firehose.DeliveryStream(self, "RuntimeLogStream", destination=firehose.S3Bucket(log_bucket) ) agentcore.Runtime(self, "test-runtime", runtime_name="test_runtime", agent_runtime_artifact=agent_runtime_artifact, tracing_enabled=True, logging_configs=[agentcore.LoggingConfig( log_type=agentcore.LogType.APPLICATION_LOGS, destination=agentcore.LoggingDestination.cloud_watch_logs(log_group) ), agentcore.LoggingConfig( log_type=agentcore.LogType.APPLICATION_LOGS, destination=agentcore.LoggingDestination.s3(log_bucket) ), agentcore.LoggingConfig( log_type=agentcore.LogType.APPLICATION_LOGS, destination=agentcore.LoggingDestination.firehose(firehose_stream) ) ] )
- Stability:
experimental
Static Methods
- classmethod cloud_watch_logs(log_group)
(experimental) Create a logging destination that sends logs to a CloudWatch Log Group.
- Parameters:
log_group (
ILogGroup) – The CloudWatch Log Group to send logs to.- Stability:
experimental
- Return type:
- classmethod firehose(stream)
(experimental) Create a logging destination that sends logs to a Kinesis Data Firehose delivery stream.
- Parameters:
stream (
IDeliveryStream) – The Firehose delivery stream to send logs to.- Stability:
experimental
- Return type: