← Back

AI Threat Detection Architecture

Real-time anomaly detection system processing JSON logs every 5 minutes

System Overview

This serverless architecture processes streaming logs through machine learning to detect security threats with 94.2% accuracy.

1

JSON Log Ingestion

Streaming JSON logs delivered every 5 minutes

  • CloudTrail API events
  • System activity logs
  • Network traffic data
2

Lambda Feature Extraction

Key features extracted:

  • api_freq: API call frequency
  • ip_entropy: IP address entropy
  • 128-dimensional feature vector

Performance: P99: 220ms | RAM: 1024MB

3

Amazon SageMaker Scoring

Machine learning model evaluation:

  • Anomaly score generation (0-1)
  • Threshold: 0.957 for alerts
  • Model accuracy: 94.2% | AUC: 0.97
4

Alerting & Archival

Action based on threat score:

  • Score > 0.957: Slack/PagerDuty alert
  • Score ≤ threshold: Archive to Glacier

Key Metrics

Processing Speed

220ms

P99 latency for feature extraction

Model Accuracy

94.2%

Threat detection rate

Feature Dimensions

128

Dimensional feature vector

AUC Score

0.97

Model discrimination ability

Architecture Legend

Data Collection: JSON log streams (blue)
Processing: Feature extraction (orange)
Critical Alerts: Score > 0.957 (red)
Normal Flow: Archive to Glacier (green)

Technical Specifications

  • Lambda Function: Python runtime, 1024MB RAM
  • Feature Vector: 128 dimensions including API frequency and IP entropy
  • Alert Threshold: 0.957 anomaly score
  • Data Retention: Hot storage (30 days), Glacier archive (1 year+)