class LoggingDestination
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.LoggingDestination |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#LoggingDestination |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.LoggingDestination |
Python | aws_cdk.aws_bedrock_agentcore_alpha.LoggingDestination |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป LoggingDestination |
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
Example
const repository = new ecr.Repository(this, 'TestRepository', {
repositoryName: 'test-agent-runtime',
});
const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, 'v1.0.0');
// Create logging destinations
const logGroup = new logs.LogGroup(this, 'RuntimeLogGroup');
const logBucket = new s3.Bucket(this, 'RuntimeLogBucket');
const firehoseStream = new firehose.DeliveryStream(this, 'RuntimeLogStream', {
destination: new firehose.S3Bucket(logBucket),
});
new agentcore.Runtime(this, 'test-runtime', {
runtimeName: 'test_runtime',
agentRuntimeArtifact: agentRuntimeArtifact,
tracingEnabled: true,
loggingConfigs: [
{
logType: agentcore.LogType.APPLICATION_LOGS,
destination: agentcore.LoggingDestination.cloudWatchLogs(logGroup),
},
{
logType: agentcore.LogType.APPLICATION_LOGS,
destination: agentcore.LoggingDestination.s3(logBucket),
},
{
logType: agentcore.LogType.APPLICATION_LOGS,
destination: agentcore.LoggingDestination.firehose(firehoseStream),
},
],
});
Initializer
new LoggingDestination()
Methods
| Name | Description |
|---|---|
| static cloud | Create a logging destination that sends logs to a CloudWatch Log Group. |
| static firehose(stream) | Create a logging destination that sends logs to a Kinesis Data Firehose delivery stream. |
| static s3(bucket) | Create a logging destination that sends logs to an S3 bucket. |
static cloudWatchLogs(logGroup)
public static cloudWatchLogs(logGroup: ILogGroup): LoggingDestination
Parameters
- logGroup
ILogโ The CloudWatch Log Group to send logs to.Group
Returns
Create a logging destination that sends logs to a CloudWatch Log Group.
static firehose(stream)
public static firehose(stream: IDeliveryStream): LoggingDestination
Parameters
- stream
IDeliveryโ The Firehose delivery stream to send logs to.Stream
Returns
Create a logging destination that sends logs to a Kinesis Data Firehose delivery stream.
static s3(bucket)
public static s3(bucket: IBucket): LoggingDestination
Parameters
- bucket
IBucketโ The S3 bucket to send logs to.
Returns
Create a logging destination that sends logs to an S3 bucket.

.NET
Go
Java
Python
TypeScript (