# hazelsharmacoderhz/aws-cloudx-honeypot architecture

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

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

## Overview

AWS-CloudX-HoneyPot collects Cowrie SSH honeypot logs and turns them into searchable event records and monitoring output. The documented workflow runs from honeypot logs through S3, a parsing Lambda, DynamoDB, a stream-triggered Lambda, and CloudWatch Logs. The parser’s S3 reads and DynamoDB writes are visible in its source; downstream event wiring is documented in the README. The README also describes local Docker/LocalStack execution, but the sampled setup script does not establish its detailed wiring.

Main entry points: [`Lambda Functions/CowrieLogParser.py`](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/CowrieLogParser.py) (Cowrie log parser), [`Lambda Functions/LogDynamoDBToCloudWatch.py`](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/LogDynamoDBToCloudWatch.py) (CloudWatch log forwarder), [`Log Collection and Upload/AWS CLI Automation.sh`](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Log%20Collection%20and%20Upload/AWS%20CLI%20Automation.sh) (Log collection and upload), [`docker-compose.yml`](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/docker-compose.yml) (Local Docker environment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Log collection"]
  node_honeypot["Cowrie SSH honeypot"]
  node_log_upload["Log collection and upload"]
  node_s3[("Honeypot log bucket")]
end

subgraph group_processing["Event processing"]
  node_parser["Cowrie log parser<br/>[CowrieLogParser.py]"]
  node_parse_events["Event parsing<br/>[CowrieLogParser.py]"]
  node_dynamodb[("CowrieLogs table")]
  node_stream["DynamoDB stream"]
end

subgraph group_monitoring["Monitoring"]
  node_cloudwatch_lambda["CloudWatch log forwarder"]
  node_cloudwatch[("CloudWatch Logs")]
end

subgraph group_local["Local execution"]
  node_localstack["LocalStack setup<br/>[01_setup.sh]"]
  node_local_compose["Local Docker environment<br/>[docker-compose.yml]"]
end

node_honeypot -->|"uploads logs"| node_s3
node_log_upload -->|"uploads logs"| node_s3
node_s3 -->|"triggers on object"| node_parser
node_parser -->|"reads object"| node_s3
node_parser -->|"parses lines"| node_parse_events
node_parser -->|"writes events"| node_dynamodb
node_dynamodb -->|"emits changes"| node_stream
node_stream -->|"triggers on change"| node_cloudwatch_lambda
node_cloudwatch_lambda -->|"prints event records"| node_cloudwatch
node_local_compose -.->|"starts locally"| node_localstack

click node_log_upload "https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Log%20Collection%20and%20Upload/AWS%20CLI%20Automation.sh"
click node_parser "https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/CowrieLogParser.py"
click node_parse_events "https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/CowrieLogParser.py"
click node_cloudwatch_lambda "https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/LogDynamoDBToCloudWatch.py"
click node_localstack "https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/localstack/init/ready.d/01_setup.sh"
click node_local_compose "https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/docker-compose.yml"

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_honeypot,node_log_upload,node_s3 toneBlue
class node_parser,node_parse_events,node_dynamodb,node_stream toneAmber
class node_cloudwatch_lambda,node_cloudwatch toneMint
class node_localstack,node_local_compose toneRose
```

## Components

### Log collection

- **Cowrie SSH honeypot**
- [Log collection and upload](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Log%20Collection%20and%20Upload/AWS%20CLI%20Automation.sh): `Log Collection and Upload/AWS CLI Automation.sh`
- **Honeypot log bucket**

### Event processing

- [Cowrie log parser](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/CowrieLogParser.py): `Lambda Functions/CowrieLogParser.py`
- [Event parsing](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/CowrieLogParser.py): `Lambda Functions/CowrieLogParser.py`
- **CowrieLogs table**
- **DynamoDB stream**

### Monitoring

- [CloudWatch log forwarder](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/Lambda%20Functions/LogDynamoDBToCloudWatch.py): `Lambda Functions/LogDynamoDBToCloudWatch.py`
- **CloudWatch Logs**

### Local execution

- [LocalStack setup](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/localstack/init/ready.d/01_setup.sh): `localstack/init/ready.d/01_setup.sh`
- [Local Docker environment](https://github.com/hazelsharmacoderhz/aws-cloudx-honeypot/blob/main/docker-compose.yml): `docker-compose.yml`

## Connections

- Cowrie SSH honeypot → Honeypot log bucket: uploads logs (evidence: `README.md`)
- Log collection and upload → Honeypot log bucket: uploads logs (evidence: `README.md`)
- Honeypot log bucket → Cowrie log parser: triggers on object (evidence: `README.md`)
- Cowrie log parser → Honeypot log bucket: reads object (evidence: `Lambda Functions/CowrieLogParser.py`)
- Cowrie log parser → Event parsing: parses lines (evidence: `Lambda Functions/CowrieLogParser.py`)
- Cowrie log parser → CowrieLogs table: writes events (evidence: `Lambda Functions/CowrieLogParser.py`)
- CowrieLogs table → DynamoDB stream: emits changes (evidence: `README.md`)
- DynamoDB stream → CloudWatch log forwarder: triggers on change (evidence: `README.md`)
- CloudWatch log forwarder → CloudWatch Logs: prints event records (evidence: `README.md`)
- Local Docker environment → LocalStack setup: starts locally (evidence: `README.md`)
