Every engineer knows the cognitive tax of the manual log hunt. It starts with a critical alert, followed by a frantic dive into CloudWatch to find a stack trace, and then a tedious manual search through GitHub to find the exact line of code that triggered the failure. For the team at TReNDS, this cycle of context-switching and manual tracing consumed between 15 and 30 minutes for every single error analysis. This wasn't just a time sink; it was a bottleneck that delayed recovery and drained developer productivity.

The Architecture of Automated Root Cause Analysis

TReNDS, a collaborative center involving Georgia State University, Georgia Institute of Technology, and Emory University, has operated a complex API and research tool infrastructure based on Amazon EKS since 2019. Their existing telemetry stack utilized FluentBit to stream all application logs into Amazon CloudWatch, providing a centralized repository for system health. However, the gap between having the logs and understanding the cause remained a manual process. To bridge this, TReNDS engineered an automated Root Cause Analysis (RCA) pipeline by integrating Amazon Bedrock with the Strands Agents SDK.

The pipeline triggers the moment a failure occurs. Amazon CloudWatch Subscription Filters are configured to monitor for specific high-severity patterns including ERROR, Exception, FATAL, and CRITICAL. When a match is detected, CloudWatch invokes an AWS Lambda function. This handler performs the critical first step of data preparation, decoding base64-encoded and gzip-compressed log events into raw text that the Strands Agent can ingest. Once the data is cleaned, the Strands Agent leverages the foundation models within Amazon Bedrock to reason through the relationship between the error message, the associated source code, and the likely root cause. The final output is a structured RCA report delivered immediately to the operations team via Amazon SNS.

From Simple Summarization to Tool-Driven Reasoning

The fundamental shift in this implementation is the move from a passive summary bot to an active, tool-using agent. Most AI log analyzers simply summarize the text provided to them, but the TReNDS pipeline utilizes the `@tool` decorator within the Strands Agents SDK to grant the LLM agency over its environment. This allows the model to autonomously decide which external data it needs to fetch to complete its analysis, rather than following a rigid, hardcoded decision tree.

Two primary tools drive this intelligence. The `fetch_source_code` tool allows the agent to take a file path and line number from a stack trace and query the GitHub API to retrieve the actual implementation code. Simultaneously, the `fetch_log_context` tool enables the agent to pull logs from a specific CloudWatch logStream surrounding the timestamp of the error, reconstructing the sequence of events leading up to the crash. The agent does not simply run these in a linear sequence; it performs iterative reasoning. If the source code reveals a dependency on another module, the agent can autonomously decide to fetch additional code snippets or search for related error handling patterns before finalizing its report. This transforms the LLM from a text processor into a digital forensic investigator.

Beyond the logic, the architecture addresses the stringent requirements of healthcare data. Because TReNDS handles sensitive research data, the system must adhere to the Health Insurance Portability and Accountability Act (HIPAA). By utilizing Amazon Bedrock, the team ensured that all requests and data processing remain within the AWS account boundary. This data residency prevents logs and source code from being transmitted to external third-party endpoints, maintaining a secure perimeter. This design is highly portable; any environment using ECS, Lambda, EC2, or on-premises servers can adopt this pipeline as long as the log collection is unified via CloudWatch. Engineers can verify the security posture of this flow by consulting the AWS HIPAA Eligible Services Reference.

For teams looking to implement this, the deployment is streamlined through the official Strands Agents Lambda layer, which removes the need for manual SDK bundling. The goal of this system is not to replace the engineer with an autonomous decision-maker, but to drastically reduce the Mean Time To Recovery (MTTR) by presenting the engineer with a pre-assembled evidence folder. The final verification step remains human; the operations team reviews the SNS report to ensure the retrieved code and context align with the actual failure. By placing the human expert at the end of a high-speed data gathering pipeline, TReNDS eliminates the 30-minute search and replaces it with a few seconds of validation.

This shift toward tool-augmented RCA marks the transition from AI as a consultant to AI as an operational teammate.