# pravinraj213/incident-sentinel architecture

> Architecture diagram of the GitHub repository pravinraj213/incident-sentinel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pravinraj213/incident-sentinel
- Repository: https://github.com/pravinraj213/incident-sentinel

## Overview

Incident Sentinel is a small AWS serverless security-monitoring application. An S3 upload invokes its Lambda handler, which asks Rekognition to detect image labels, filters predictions against configured threat-confidence thresholds, and publishes an alert to SNS when any qualify; otherwise it logs a clean result. The graph separates the analysis, decision, and notification stages despite their implementation in one file. The invocation and notification delivery are documented in the README; the source excerpt shows the handler’s service calls. No separate storage subsystem is implemented in the repository.

Main entry points: [`lambda_function.py`](https://github.com/pravinraj213/incident-sentinel/blob/main/lambda_function.py) (Lambda Handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Image Analysis"]
  node_handler["Lambda Handler<br/>[lambda_function.py]"]
  node_rekognition["Rekognition"]
end

subgraph group_decision["Threat Decision"]
  node_filter["Threat Filter<br/>[lambda_function.py]"]
end

subgraph group_notification["Alerting"]
  node_sns["SNS Topic"]
  node_recipients(("Email/SMS Recipients"))
end

node_s3[("S3 Upload")]

node_s3 -->|"invokes on upload"| node_handler
node_handler -->|"requests labels"| node_rekognition
node_rekognition -->|"returns labels"| node_handler
node_handler -->|"filters predictions"| node_filter
node_handler -->|"publishes qualifying alerts"| node_sns
node_sns -->|"delivers notifications"| node_recipients

click node_handler "https://github.com/pravinraj213/incident-sentinel/blob/main/lambda_function.py"
click node_filter "https://github.com/pravinraj213/incident-sentinel/blob/main/lambda_function.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_handler,node_rekognition toneBlue
class node_filter,node_s3 toneAmber
class node_sns,node_recipients toneMint
```

## Components

### Image Analysis

- [Lambda Handler](https://github.com/pravinraj213/incident-sentinel/blob/main/lambda_function.py): `lambda_function.py`
- **Rekognition**

### Threat Decision

- [Threat Filter](https://github.com/pravinraj213/incident-sentinel/blob/main/lambda_function.py): `lambda_function.py`

### Alerting

- **SNS Topic**
- **Email/SMS Recipients**

### Other components

- **S3 Upload**

## Connections

- S3 Upload → Lambda Handler: invokes on upload (evidence: `README.md`)
- Lambda Handler → Rekognition: requests labels (evidence: `lambda_function.py`)
- Rekognition → Lambda Handler: returns labels (evidence: `lambda_function.py`)
- Lambda Handler → Threat Filter: filters predictions (evidence: `lambda_function.py`)
- Lambda Handler → SNS Topic: publishes qualifying alerts (evidence: `lambda_function.py`)
- SNS Topic → Email/SMS Recipients: delivers notifications (evidence: `README.md`)
