How sidd07-hub/ai-incident-response works
The repository’s product is an AWS incident-response agent: an alarm event enters through SNS and Lambda, the agent gathers evidence, requests AI analysis, and notifies responders; the README also documents S3 report storage. Source-index references support the handler-to-agent and agent-to-tool calls. Tool implementations beyond the indexed excerpts, including report persistence and the additional remediation/RCA/risk tools, were not inspected, so their runtime links are omitted. The bundled AWS and Slack SDKs are represented as supporting internal layers, not as the product workflow.
Main entry points: incident_agent.py Incident Agent · handler.py Lambda Handler · cloudwatch_reader.py CloudWatch Reader · groq_analyzer.py AI Analyzer
Components 20
Event Ingestion
- Lambda Handler
src/handler.py - Incident Agent
src/agents/incident_agent.py
Incident Response
- CloudWatch Reader
src/tools/cloudwatch_reader.py - AI Analyzer
src/tools/groq_analyzer.py - Slack Notifier
src/tools/slack_notifier.py - Risk Assessor
src/tools/risk_assessor.py - RCA Generator
src/tools/rca_generator.py - Auto Remediation
src/tools/auto_remediation.py
External Services
- CloudWatch Alarm
- SNS Topic
- OpenRouter AI
- Slack
- S3 Reports
SDK Layer
- Boto3 Session
package/boto3/session.py - AWS Client Runtime
package/botocore/client.py - AWS Core Modules
package/botocore - Slack Webhook Client
package/slack_sdk/webhook/client.py - Slack Async Web Client
package/slack_sdk/web/async_client.py - Slack Retry Request
package/slack_sdk/http_retry/request.py - Slack Proxy Loader
package/slack_sdk/proxy_env_variable_loader.py
Connections 16
- CloudWatch Alarm → SNS Topic: publishes event
README.md - SNS Topic → Lambda Handler: invokes
README.md - Lambda Handler → Incident Agent: calls
src/handler.py - Incident Agent → CloudWatch Reader: calls
src/agents/incident_agent.py - Incident Agent → AI Analyzer: calls
src/agents/incident_agent.py - Incident Agent → Slack Notifier: calls
src/agents/incident_agent.py - CloudWatch Reader → CloudWatch Alarm: reads logs
README.md - AI Analyzer → OpenRouter AI: requests analysis
README.md - Slack Notifier → Slack: sends alert
README.md - Incident Agent → S3 Reports: stores report
README.md - Incident Agent → Boto3 Session: uses
src/agents/incident_agent.py - Boto3 Session → AWS Client Runtime: creates clients
package/boto3/session.py - Slack Webhook Client → Slack: sends webhook
- Risk Assessor → Incident Agent: feeds assessment
- RCA Generator → Incident Agent: feeds RCA
- Auto Remediation → Incident Agent: offers remediation