AWS Builder Center
OmniTrace

OmniTrace

"Our comprehensive technical project breakdown, architecture topology, and development logs are completely documented here in our open-source production repository." Link : https://github.com/likhilliki/OmniTrace

πŸ” OmniTrace β€” Autonomous Cloud Incident Triage & Self-Healing Pipeline

Track 2: Ship It β€” AWS Serverless Hackathon submission Powered by Amazon Bedrock Nova Pro, Step Functions, EventBridge, Lambda, DynamoDB, and API Gateway

ο»Ώ

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AWS Cloud (us-east-1) β”‚
β”‚ β”‚
React SPA β”‚ API Gateway (HTTP API v2) β”‚
(Amplify) ──POST──► β”‚ /api/trigger ──► ApiHandler Lambda β”‚
◄─GET─── β”‚ /api/incidents ◄── ApiHandler Lambda β”‚
β”‚ β”‚ β–² β”‚
β”‚ β”‚ put_events β”‚ query/scan β”‚
β”‚ β–Ό β”‚ β”‚
β”‚ EventBridge Default Bus DynamoDB β”‚
β”‚ source: omnitrace.alert OmniTrace_Incidents β”‚
β”‚ β”‚ β–² β”‚
β”‚ β”‚ StartExecution β”‚ PutItem/UpdateItem β”‚
β”‚ β–Ό β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Step Functions State Machine β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚ β”‚ β”‚ AUDITOR β”‚ ◄── Bedrock Nova Pro β”‚ β”‚
β”‚ β”‚ β”‚ Agent β”‚ (root cause + INR) β”‚ β”‚
β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚ β”‚ β”‚ PATCHER β”‚ ◄── Bedrock Nova Pro β”‚ β”‚
β”‚ β”‚ β”‚ Agent β”‚ (remediation cmds) β”‚ β”‚
β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚ β”‚ β”‚ VALIDATOR β”‚ ◄── Bedrock Nova Pro β”‚ β”‚
β”‚ β”‚ β”‚ Agent β”‚ (safety audit) β”‚ β”‚
β”‚ β”‚ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚
β”‚ β”‚ β”‚ Choice State β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ verdict == EXECUTE ? β”‚ β”‚ β”‚
β”‚ β”‚ β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”˜ β”‚ β”‚
β”‚ β”‚ VETO EXECUTE β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ EscalateToSRE SelfHealer Lambda β”‚ β”‚
β”‚ β”‚ (manual review) (mock remediation) β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

ο»Ώ

βœ… AWS Services Utilized

Service
Purpose
Amazon Bedrock (Nova Pro)
AI agents for root-cause analysis, command generation, and safety validation
AWS Step Functions
Orchestrates the 3-agent pipeline with Choice state for VETO/EXECUTE routing
Amazon EventBridge
Receives Β omnitrace.alertΒ  events and triggers the state machine
AWS Lambda (Python 3.12)
Agent Dispatcher, Self-Healer, API Handler
Amazon DynamoDB
Persists all incident records, agent reasoning trails, and resolution logs
Amazon API Gateway (HTTP API v2)
REST API consumed by the React SPA
AWS Amplify
Hosts the React + Vite + Tailwind CSS frontend
Amazon CloudWatch
Logs, metrics, and alarms for the full pipeline
AWS IAM
Least-privilege roles for every Lambda and the Step Functions state machine

ο»Ώ

πŸ“ Project Structure

omni-trace/
β”œβ”€β”€ template.yaml # AWS SAM / CloudFormation template
β”œβ”€β”€ samconfig.toml # SAM CLI deployment configuration
β”œβ”€β”€ backend/
β”‚ └── handlers/
β”‚ β”œβ”€β”€ agent_dispatcher.py # AUDITOR + PATCHER + VALIDATOR agents (Bedrock)
β”‚ β”œβ”€β”€ api_handler.py # REST API (GET /incidents, POST /trigger)
β”‚ β”œβ”€β”€ self_healer.py # Executes remediation, marks RESOLVED
β”‚ └── requirements.txt # Python dependencies
β”œβ”€β”€ frontend/
β”‚ β”œβ”€β”€ index.html
β”‚ β”œβ”€β”€ package.json
β”‚ β”œβ”€β”€ vite.config.js
β”‚ β”œβ”€β”€ tailwind.config.js
β”‚ β”œβ”€β”€ postcss.config.js
β”‚ β”œβ”€β”€ .env.example
β”‚ └── src/
β”‚ β”œβ”€β”€ main.jsx
β”‚ β”œβ”€β”€ index.css
β”‚ └── App.jsx # Full SRE dashboard SPA
β”œβ”€β”€ cdk/ # Optional CDK stack (pre-existing)
└── README.md

ο»Ώ

πŸš€ Deployment Guide

Prerequisites

# Install AWS SAM CLI
pip install aws-sam-cli
ο»Ώ
# Install Node.js 18+ for frontend
# Ensure AWS credentials are configured
aws sts get-caller-identity

1️⃣ Enable Amazon Bedrock Model Access

In the AWS Console β†’ Amazon Bedrock β†’ Model access:
  • Enable Amazon Nova Pro (Β amazon.nova-pro-v1:0Β )

2️⃣ Backend Deployment (SAM)

# Clone and enter repo
cd omni-trace
ο»Ώ
# Build all Lambda functions
sam build
ο»Ώ
# Deploy to AWS (interactive β€” fill in your S3 bucket and stack name)
sam deploy --guided
ο»Ώ
# On subsequent deploys:
sam deploy
SAM deploy will output:
Outputs:
ApiEndpoint = https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/prod
DynamoDBTable = OmniTrace_Incidents
StateMachineArn = arn:aws:states:us-east-1:...
⚠️ Copy the Β ApiEndpointΒ  output β€” you need it for the frontend.

3️⃣ Frontend Deployment (AWS Amplify)

Option A β€” Amplify Console (Recommended)
  1. Push this repository to GitHub / CodeCommit / Bitbucket
  1. Go to AWS Amplify β†’ New App β†’ Host web app
  1. Connect your repository and branch
  1. Set build settings:
version: 1
frontend:
phases:
preBuild:
commands:
- cd frontend
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: frontend/dist
files:
- '**/*'
cache:
paths:
- frontend/node_modules/**/*
  1. Add environment variable in Amplify console:
  • Key: Β VITE_API_URLΒ 
  • Value: Β https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/prodΒ 
  1. Save and deploy.
Option B β€” Local development
cd frontend
cp .env.example .env.local
# Edit .env.local and set VITE_API_URL to your ApiEndpoint
ο»Ώ
npm install
npm run dev
# Visit http://localhost:3000
Option C β€” Manual S3 + CloudFront
cd frontend
npm install
npm run build
ο»Ώ
# Create S3 bucket for hosting
aws s3 mb s3://omnitrace-dashboard-$(date +%s)
ο»Ώ
# Upload build
aws s3 sync dist/ s3://YOUR_BUCKET_NAME --delete
ο»Ώ
# Or use AWS CLI to create CloudFront distribution

ο»Ώ

πŸ”§ Local Testing

Test individual Lambda handlers locally:

# Test API Handler
sam local invoke OmniTraceApiHandler --event events/trigger.json
ο»Ώ
# Test Agent Dispatcher (AUDITOR role)
sam local invoke OmniTraceAgentDispatcher --event events/auditor.json
ο»Ώ
# Start local API
sam local start-api --port 8080

Sample event files:

Β events/trigger.jsonΒ 
{
"requestContext": { "http": { "method": "POST" } },
"rawPath": "/api/trigger",
"body": "{\"triggeredBy\": \"test\"}"
}
Β events/auditor.jsonΒ 
{
"agent_role": "AUDITOR",
"incident": {
"incidentId": "INC-TEST-001",
"service": "omnitrace-api",
"errorType": "MEMORY_EXHAUSTION",
"severity": "P1",
"region": "us-east-1",
"errorLogs": "[ERROR] Lambda runtime exited: signal: killed\n[CRITICAL] Memory 512/512 MB exhausted",
"timestamp": "2025-01-15T14:30:00Z"
}
}

ο»Ώ

πŸ“Š Key Design Decisions

Decision
Rationale
Nova Pro model
Optimal for structured JSON output, strong reasoning at low cost
Bedrock Converse API
Unified API across models, supports system prompts cleanly
3-agent sequential pipeline
Separation of concerns β€” each agent specializes in one task
VETO safety gate
Prevents autonomous execution of destructive operations
DynamoDB for agent state
Full audit trail of every reasoning step, queryable by incidentId
EventBridge as trigger
Decouples simulation from pipeline β€” real CloudWatch alarms can fire the same event
HTTP API v2
Lower latency and cost than REST API for simple CRUD operations
INR cost estimates
India-first audience, more relatable for the hackathon demographic

ο»Ώ

πŸ›‘οΈ Security Notes

  • All Lambda functions use least-privilege IAM roles
  • Bedrock model access is scoped to specific model ARNs
  • DynamoDB access is scoped to the single OmniTrace_Incidents table
  • API Gateway has CORS configured (restrict Β AllowOriginsΒ  to your Amplify domain in production)
  • VALIDATOR agent acts as a mandatory safety gate before any auto-remediation

ο»Ώ

πŸ“ˆ Extending OmniTrace

  1. Connect real CloudWatch Alarms: Replace the UI trigger with an EventBridge rule matching Β aws.cloudwatchΒ  alarm state changes
  1. Add SNS notifications: Subscribe an SNS topic to send escalation emails when VALIDATOR issues VETO
  1. Multi-region support: Deploy the stack to multiple regions and use EventBridge cross-region targets
  1. Slack integration: Add a Lambda step after VETO to post to Slack with an approve/reject button
  1. Historical analytics: Add a Glue + Athena pipeline over DynamoDB exports for incident analytics

ο»Ώ

πŸ“ License

MIT β€” Built for the AWS Serverless Hackathon, Track 2: Ship It.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article