# guhan05/aws-honeypot architecture

> Architecture diagram of the GitHub repository guhan05/aws-honeypot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/guhan05/aws-honeypot
- Repository: https://github.com/guhan05/aws-honeypot

## Overview

This repository appears to implement an SSH honeypot that records attack activity and exposes it through a browser dashboard. The likely workflow runs a honeypot host, collects its logs, stores parsed attack records, and serves those records to the dashboard; Terraform files indicate AWS resources for this system. The Lambda excerpts confirm log parsing and database access, but the README is empty and Terraform, dashboard, and setup contents were not sampled, so their connections are shown as unverified.

Main entry points: [`terraform/cloudwatch.tf`](https://github.com/guhan05/aws-honeypot/blob/main/terraform/cloudwatch.tf) (Attack logs), [`terraform/ec2.tf`](https://github.com/guhan05/aws-honeypot/blob/main/terraform/ec2.tf) (SSH honeypot host), [`lambda/alert_handler.py`](https://github.com/guhan05/aws-honeypot/blob/main/lambda/alert_handler.py) (Log processor), [`lambda/api_handler.py`](https://github.com/guhan05/aws-honeypot/blob/main/lambda/api_handler.py) (Records API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Honeypot Host"]
  node_setup["Host setup<br/>[setup.sh]"]
  node_honeypot["SSH honeypot host<br/>[ec2.tf]"]
end

subgraph group_pipeline["Attack Data"]
  node_logs[("Attack logs<br/>[cloudwatch.tf]")]
  node_alert["Log processor<br/>[alert_handler.py]"]
end

subgraph group_aws["AWS Services"]
  node_records[("Attack records<br/>[dynamodb.tf]")]
  node_api["Records API<br/>[api_handler.py]"]
  node_gateway["API Gateway<br/>[apigateway.tf]"]
  node_guardduty["GuardDuty<br/>[guardduty.tf]"]
  node_sns["SNS alerts<br/>[sns.tf]"]
  node_iam["IAM permissions<br/>[iam.tf]"]
  node_lambda_config["Lambda resources<br/>[lambda.tf]"]
  node_cloudwatch_config["CloudWatch resources<br/>[cloudwatch.tf]"]
end

subgraph group_ui["Dashboard"]
  node_dashboard["Attack dashboard<br/>[index.html]"]
end

node_operator(("Dashboard user"))

node_alert -->|"writes records"| node_records
node_api -->|"scans records"| node_records
node_operator -.->|"views"| node_dashboard
node_dashboard -.->|"requests records"| node_gateway
node_gateway -.->|"invokes"| node_api
node_setup -.->|"configures host"| node_honeypot
node_honeypot -.->|"emits logs"| node_logs
node_logs -.->|"triggers processing"| node_alert
node_guardduty -.->|"sends alerts"| node_sns
node_iam -.->|"grants access"| node_lambda_config
node_cloudwatch_config -.->|"configures logging"| node_logs

click node_setup "https://github.com/guhan05/aws-honeypot/blob/main/honeypot/setup.sh"
click node_honeypot "https://github.com/guhan05/aws-honeypot/blob/main/terraform/ec2.tf"
click node_logs "https://github.com/guhan05/aws-honeypot/blob/main/terraform/cloudwatch.tf"
click node_alert "https://github.com/guhan05/aws-honeypot/blob/main/lambda/alert_handler.py"
click node_records "https://github.com/guhan05/aws-honeypot/blob/main/terraform/dynamodb.tf"
click node_api "https://github.com/guhan05/aws-honeypot/blob/main/lambda/api_handler.py"
click node_gateway "https://github.com/guhan05/aws-honeypot/blob/main/terraform/apigateway.tf"
click node_dashboard "https://github.com/guhan05/aws-honeypot/blob/main/dashboard/index.html"
click node_guardduty "https://github.com/guhan05/aws-honeypot/blob/main/terraform/guardduty.tf"
click node_sns "https://github.com/guhan05/aws-honeypot/blob/main/terraform/sns.tf"
click node_iam "https://github.com/guhan05/aws-honeypot/blob/main/terraform/iam.tf"
click node_lambda_config "https://github.com/guhan05/aws-honeypot/blob/main/terraform/lambda.tf"
click node_cloudwatch_config "https://github.com/guhan05/aws-honeypot/blob/main/terraform/cloudwatch.tf"

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_setup,node_honeypot,node_operator toneBlue
class node_logs,node_alert toneAmber
class node_records,node_api,node_gateway,node_guardduty,node_sns,node_iam,node_lambda_config,node_cloudwatch_config toneMint
class node_dashboard toneRose
```

## Components

### Honeypot Host

- [Host setup](https://github.com/guhan05/aws-honeypot/blob/main/honeypot/setup.sh): `honeypot/setup.sh`
- [SSH honeypot host](https://github.com/guhan05/aws-honeypot/blob/main/terraform/ec2.tf): `terraform/ec2.tf`

### Attack Data

- [Attack logs](https://github.com/guhan05/aws-honeypot/blob/main/terraform/cloudwatch.tf): `terraform/cloudwatch.tf`
- [Log processor](https://github.com/guhan05/aws-honeypot/blob/main/lambda/alert_handler.py): `lambda/alert_handler.py`

### AWS Services

- [Attack records](https://github.com/guhan05/aws-honeypot/blob/main/terraform/dynamodb.tf): `terraform/dynamodb.tf`
- [Records API](https://github.com/guhan05/aws-honeypot/blob/main/lambda/api_handler.py): `lambda/api_handler.py`
- [API Gateway](https://github.com/guhan05/aws-honeypot/blob/main/terraform/apigateway.tf): `terraform/apigateway.tf`
- [GuardDuty](https://github.com/guhan05/aws-honeypot/blob/main/terraform/guardduty.tf): `terraform/guardduty.tf`
- [SNS alerts](https://github.com/guhan05/aws-honeypot/blob/main/terraform/sns.tf): `terraform/sns.tf`
- [IAM permissions](https://github.com/guhan05/aws-honeypot/blob/main/terraform/iam.tf): `terraform/iam.tf`
- [Lambda resources](https://github.com/guhan05/aws-honeypot/blob/main/terraform/lambda.tf): `terraform/lambda.tf`
- [CloudWatch resources](https://github.com/guhan05/aws-honeypot/blob/main/terraform/cloudwatch.tf): `terraform/cloudwatch.tf`

### Dashboard

- [Attack dashboard](https://github.com/guhan05/aws-honeypot/blob/main/dashboard/index.html): `dashboard/index.html`

### Other components

- **Dashboard user**

## Connections

- Log processor → Attack records: writes records (evidence: `lambda/alert_handler.py`)
- Records API → Attack records: scans records (evidence: `lambda/api_handler.py`)
- Dashboard user → Attack dashboard: views
- Attack dashboard → API Gateway: requests records
- API Gateway → Records API: invokes
- Host setup → SSH honeypot host: configures host
- SSH honeypot host → Attack logs: emits logs
- Attack logs → Log processor: triggers processing
- GuardDuty → SNS alerts: sends alerts
- IAM permissions → Lambda resources: grants access
- CloudWatch resources → Attack logs: configures logging
