Skip to content

Bedrock AgentCore  >  Structures  >  CloudWatchLogsSource

CloudWatchLogsSource

Structure Class

CloudWatchLogsSource dataclass

The configuration for reading agent traces from CloudWatch Logs.

Attributes

filter_config class-attribute instance-attribute
filter_config: CloudWatchFilterConfig | None = None

Optional filter configuration to narrow down which sessions to evaluate.

log_group_name_prefixes class-attribute instance-attribute
log_group_name_prefixes: list[str] | None = None

The list of CloudWatch log group name prefixes to read agent traces from. Specify this instead of logGroupNames to match log groups by prefix. Maximum of 5 prefixes. Specify either logGroupNames or logGroupNamePrefixes, not both. One of the two is required.

log_group_names class-attribute instance-attribute
log_group_names: list[str] = field(default_factory=list[str])

The list of CloudWatch log group names to read agent traces from. Maximum of 10 log groups.

service_names instance-attribute
service_names: list[str]

The list of agent service names to filter traces within the specified log groups.