# hakimizz-tech/aws-bedrock-chatbot-agent architecture

> Architecture diagram of the GitHub repository hakimizz-tech/aws-bedrock-chatbot-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hakimizz-tech/aws-bedrock-chatbot-agent
- Repository: https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent

## Overview

This repository is Terraform infrastructure for deploying a self-hosted Bedrock chatbot, rather than the chatbot application code itself. The documented user workflow is browser access through the load balancer to Open WebUI, which uses the Bedrock Access Gateway for model access and MCPO for optional MCP tools. The graph also captures documented storage, networking, security, and deployment-state services. Application-service wiring and some resource details are based on the README; source excerpts were not available to verify further relationships.

Main entry points: [`ecs.tf`](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf) (Terraform stack), [`containers/mcpo/config.json`](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/containers/mcpo/config.json) (MCPO tools), [`s3.tf`](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/s3.tf) (Upload storage), [`vpc.tf`](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/vpc.tf) (VPC and subnets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Chat services"]
  node_webui["Open WebUI<br/>[ecs.tf]"]
  node_gateway["Bedrock Access Gateway<br/>[ecs.tf]"]
  node_mcpo["MCPO tools<br/>[config.json]"]
end

subgraph group_network["Network and ingress"]
  node_alb["Application load balancer<br/>[ecs.tf]"]
  node_cloudmap["Cloud Map discovery<br/>[ecs.tf]"]
  node_vpc["VPC and subnets<br/>[vpc.tf]"]
  node_endpoints["Interface endpoints<br/>[main.tf]"]
  node_vpcsg["Security groups<br/>[main.tf]"]
end

subgraph group_platform["Compute and storage"]
  node_efs[("Persistent user data<br/>[ecs.tf]")]
  node_uploads[("Upload storage<br/>[s3.tf]")]
  node_ecr["Container registry<br/>[ecr.tf]"]
end

subgraph group_security["Identity and secrets"]
  node_iam["Task IAM roles<br/>[main.tf]"]
  node_secrets[("Secrets Manager<br/>[secrets_manager.tf]")]
  node_certificate["ACM certificate<br/>[acm_certificate.tf]"]
end

subgraph group_state["Terraform state"]
  node_statebucket[("Remote state bucket<br/>[main.tf]")]
end

node_user(("Browser user"))
node_bedrock["Amazon Bedrock"]
node_mcp["MCP servers"]
node_terraform["Terraform stack<br/>[ecs.tf]"]

node_user -->|"opens endpoint"| node_alb
node_alb -->|"routes requests"| node_webui
node_webui -->|"sends model requests"| node_gateway
node_gateway -->|"translates API calls"| node_bedrock
node_webui -.->|"uses tools"| node_mcpo
node_mcpo -.->|"serves tools"| node_mcp
node_webui -->|"discovers services"| node_cloudmap
node_gateway -->|"discovered through"| node_cloudmap
node_mcpo -.->|"discovered through"| node_cloudmap
node_terraform -->|"provisions"| node_vpc
node_terraform -->|"provisions"| node_alb
node_terraform -->|"deploys service"| node_webui
node_terraform -->|"deploys service"| node_gateway
node_terraform -->|"deploys service"| node_mcpo
node_terraform -->|"provisions"| node_efs
node_terraform -->|"provisions"| node_uploads
node_terraform -->|"provisions"| node_ecr
node_terraform -->|"provisions"| node_iam
node_terraform -->|"provisions"| node_secrets
node_terraform -.->|"optionally provisions"| node_certificate
node_terraform -.->|"optionally provisions"| node_endpoints
node_terraform -->|"provisions"| node_vpcsg
node_webui -->|"persists user data"| node_efs
node_webui -->|"stores uploads"| node_uploads
node_terraform -->|"sets up state"| node_statebucket

click node_alb "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf"
click node_webui "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf"
click node_gateway "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf"
click node_mcpo "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/containers/mcpo/config.json"
click node_cloudmap "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf"
click node_vpc "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/vpc.tf"
click node_endpoints "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/modules/vpc_endpoints_interface/main.tf"
click node_efs "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf"
click node_uploads "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/s3.tf"
click node_ecr "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecr.tf"
click node_iam "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/modules/iam_role/main.tf"
click node_secrets "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/secrets_manager.tf"
click node_certificate "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/acm_certificate.tf"
click node_statebucket "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/terraform_state/main.tf"
click node_terraform "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf"
click node_vpcsg "https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/modules/security_group/main.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_webui,node_gateway,node_mcpo,node_user toneBlue
class node_alb,node_cloudmap,node_vpc,node_endpoints,node_vpcsg toneAmber
class node_efs,node_uploads,node_ecr,node_mcp toneMint
class node_iam,node_secrets,node_certificate toneRose
class node_statebucket,node_bedrock toneIndigo
class node_terraform toneTeal
```

## Components

### Chat services

- [Open WebUI](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf): `ecs.tf`
- [Bedrock Access Gateway](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf): `ecs.tf`
- [MCPO tools](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/containers/mcpo/config.json): `containers/mcpo/config.json`

### Network and ingress

- [Application load balancer](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf): `ecs.tf`
- [Cloud Map discovery](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf): `ecs.tf`
- [VPC and subnets](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/vpc.tf): `vpc.tf`
- [Interface endpoints](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/modules/vpc_endpoints_interface/main.tf): `modules/vpc_endpoints_interface/main.tf`
- [Security groups](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/modules/security_group/main.tf): `modules/security_group/main.tf`

### Compute and storage

- [Persistent user data](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf): `ecs.tf`
- [Upload storage](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/s3.tf): `s3.tf`
- [Container registry](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecr.tf): `ecr.tf`

### Identity and secrets

- [Task IAM roles](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/modules/iam_role/main.tf): `modules/iam_role/main.tf`
- [Secrets Manager](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/secrets_manager.tf): `secrets_manager.tf`
- [ACM certificate](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/acm_certificate.tf): `acm_certificate.tf`

### Terraform state

- [Remote state bucket](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/terraform_state/main.tf): `terraform_state/main.tf`

### Other components

- **Browser user**
- **Amazon Bedrock**
- **MCP servers**
- [Terraform stack](https://github.com/hakimizz-tech/aws-bedrock-chatbot-agent/blob/main/ecs.tf): `ecs.tf`

## Connections

- Browser user → Application load balancer: opens endpoint
- Application load balancer → Open WebUI: routes requests
- Open WebUI → Bedrock Access Gateway: sends model requests
- Bedrock Access Gateway → Amazon Bedrock: translates API calls
- Open WebUI → MCPO tools: uses tools
- MCPO tools → MCP servers: serves tools
- Open WebUI → Cloud Map discovery: discovers services
- Bedrock Access Gateway → Cloud Map discovery: discovered through
- MCPO tools → Cloud Map discovery: discovered through
- Terraform stack → VPC and subnets: provisions
- Terraform stack → Application load balancer: provisions
- Terraform stack → Open WebUI: deploys service
- Terraform stack → Bedrock Access Gateway: deploys service
- Terraform stack → MCPO tools: deploys service
- Terraform stack → Persistent user data: provisions
- Terraform stack → Upload storage: provisions
- Terraform stack → Container registry: provisions
- Terraform stack → Task IAM roles: provisions
- Terraform stack → Secrets Manager: provisions
- Terraform stack → ACM certificate: optionally provisions
- Terraform stack → Interface endpoints: optionally provisions
- Terraform stack → Security groups: provisions
- Open WebUI → Persistent user data: persists user data
- Open WebUI → Upload storage: stores uploads
- Terraform stack → Remote state bucket: sets up state
