# venkatasubbarao13/aws-python-app-github-actions-deployment architecture

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

- Interactive diagram: https://gitdiagram.com/venkatasubbarao13/aws-python-app-github-actions-deployment
- Repository: https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment

## Overview

This repository is an AWS deployment lab: Terraform provisions public and private EC2 infrastructure, and manually triggered GitHub Actions workflows deploy a Flask API using three routes—direct SSH, SSH through a bastion, or Systems Manager Run Command. The main user workflow is provision infrastructure, choose a deployment route, then verify the app’s information and health endpoints. The graph keeps those routes distinct and includes infrastructure teardown. Workflow and Terraform source excerpts were not provided, so their links are based on the README’s documented architecture and workflows; unverified implementation details are omitted.

Main entry points: [`.github/workflows/terraform-infrastructure.yml`](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/terraform-infrastructure.yml) (Infrastructure workflow), [`main.tf`](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/main.tf) (EC2 instances), [`app/app.py`](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/app/app.py) (Flask JSON API), [`.github/workflows/deploy-public.yml`](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-public.yml) (Direct SSH and SCP)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_infrastructure["AWS infrastructure"]
  node_terraform_inputs["Terraform inputs<br/>[variables.tf]"]
  node_terraform_provider[("Terraform provider and state<br/>[providers.tf]")]
  node_aws_network["VPC and networking<br/>[main.tf]"]
  node_aws_instances["EC2 instances<br/>[main.tf]"]
  node_terraform_outputs["Terraform outputs<br/>[outputs.tf]"]
end

subgraph group_automation["GitHub workflows"]
  node_infra_workflow["Infrastructure workflow"]
  node_destroy_workflow["Destroy workflow"]
  node_public_workflow["Public deploy workflow<br/>[deploy-public.yml]"]
  node_bastion_workflow["Bastion deploy workflow<br/>[deploy-bastion.yml]"]
  node_ssm_workflow["SSM deploy workflow<br/>[deploy-ssm.yml]"]
end

subgraph group_deployment["Deployment routes"]
  node_direct_ssh["Direct SSH and SCP<br/>[deploy-public.yml]"]
  node_bastion_route["Bastion SSH route<br/>[deploy-bastion.yml]"]
  node_ssm_route["Systems Manager route<br/>[deploy-ssm.yml]"]
  node_deploy_script["Deployment script<br/>[deploy.sh]"]
end

subgraph group_application["Application runtime"]
  node_flask_api["Flask JSON API<br/>[app.py]"]
  node_app_dependencies["Runtime dependencies<br/>[requirements.txt]"]
end

node_operator(("Repository operator"))
node_actions["GitHub Actions"]
node_aws["AWS"]
node_api_clients(("API clients"))

node_operator -->|"manually triggers"| node_actions
node_infra_workflow -->|"uses inputs"| node_terraform_inputs
node_infra_workflow -->|"applies configuration"| node_terraform_provider
node_infra_workflow -->|"provisions network"| node_aws_network
node_infra_workflow -->|"provisions instances"| node_aws_instances
node_infra_workflow -.->|"reports outputs"| node_terraform_outputs
node_destroy_workflow -->|"destroys infrastructure"| node_aws
node_public_workflow -->|"deploys via SSH"| node_direct_ssh
node_direct_ssh -->|"copies app to"| node_aws_instances
node_bastion_workflow -->|"deploys through"| node_bastion_route
node_bastion_route -->|"SSH jump to"| node_aws_instances
node_ssm_workflow -->|"sends Run Command"| node_ssm_route
node_ssm_route -->|"executes commands on"| node_aws_instances
node_aws_instances -->|"hosts deployed app"| node_flask_api
node_flask_api -.->|"uses packages"| node_app_dependencies
node_api_clients -->|"requests endpoints"| node_flask_api
node_flask_api -->|"returns JSON"| node_api_clients

click node_terraform_inputs "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/variables.tf"
click node_terraform_provider "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/providers.tf"
click node_aws_network "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/main.tf"
click node_aws_instances "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/main.tf"
click node_terraform_outputs "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/outputs.tf"
click node_infra_workflow "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/terraform-infrastructure.yml"
click node_destroy_workflow "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/terraform-destroy.yml"
click node_public_workflow "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-public.yml"
click node_bastion_workflow "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-bastion.yml"
click node_ssm_workflow "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-ssm.yml"
click node_direct_ssh "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-public.yml"
click node_bastion_route "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-bastion.yml"
click node_ssm_route "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-ssm.yml"
click node_deploy_script "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/scripts/deploy.sh"
click node_flask_api "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/app/app.py"
click node_app_dependencies "https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/app/requirements.txt"

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_terraform_inputs,node_terraform_provider,node_aws_network,node_aws_instances,node_terraform_outputs,node_api_clients toneBlue
class node_infra_workflow,node_destroy_workflow,node_public_workflow,node_bastion_workflow,node_ssm_workflow toneAmber
class node_direct_ssh,node_bastion_route,node_ssm_route,node_deploy_script toneMint
class node_flask_api,node_app_dependencies toneRose
class node_operator,node_actions,node_aws toneIndigo
```

## Components

### AWS infrastructure

- [Terraform inputs](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/variables.tf): `variables.tf`
- [Terraform provider and state](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/providers.tf): `providers.tf`
- [VPC and networking](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/main.tf): `main.tf`
- [EC2 instances](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/main.tf): `main.tf`
- [Terraform outputs](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/outputs.tf): `outputs.tf`

### GitHub workflows

- [Infrastructure workflow](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/terraform-infrastructure.yml): `.github/workflows/terraform-infrastructure.yml`
- [Destroy workflow](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/terraform-destroy.yml): `.github/workflows/terraform-destroy.yml`
- [Public deploy workflow](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-public.yml): `.github/workflows/deploy-public.yml`
- [Bastion deploy workflow](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-bastion.yml): `.github/workflows/deploy-bastion.yml`
- [SSM deploy workflow](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-ssm.yml): `.github/workflows/deploy-ssm.yml`

### Deployment routes

- [Direct SSH and SCP](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-public.yml): `.github/workflows/deploy-public.yml`
- [Bastion SSH route](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-bastion.yml): `.github/workflows/deploy-bastion.yml`
- [Systems Manager route](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/.github/workflows/deploy-ssm.yml): `.github/workflows/deploy-ssm.yml`
- [Deployment script](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/scripts/deploy.sh): `scripts/deploy.sh`

### Application runtime

- [Flask JSON API](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/app/app.py): `app/app.py`
- [Runtime dependencies](https://github.com/venkatasubbarao13/aws-python-app-github-actions-deployment/blob/main/app/requirements.txt): `app/requirements.txt`

### Other components

- **Repository operator**
- **GitHub Actions**
- **AWS**
- **API clients**

## Connections

- Repository operator → GitHub Actions: manually triggers (evidence: `README.md`)
- Infrastructure workflow → Terraform inputs: uses inputs (evidence: `README.md`)
- Infrastructure workflow → Terraform provider and state: applies configuration (evidence: `README.md`)
- Infrastructure workflow → VPC and networking: provisions network (evidence: `README.md`)
- Infrastructure workflow → EC2 instances: provisions instances (evidence: `README.md`)
- Infrastructure workflow → Terraform outputs: reports outputs
- Destroy workflow → AWS: destroys infrastructure (evidence: `README.md`)
- Public deploy workflow → Direct SSH and SCP: deploys via SSH (evidence: `README.md`)
- Direct SSH and SCP → EC2 instances: copies app to (evidence: `README.md`)
- Bastion deploy workflow → Bastion SSH route: deploys through (evidence: `README.md`)
- Bastion SSH route → EC2 instances: SSH jump to (evidence: `README.md`)
- SSM deploy workflow → Systems Manager route: sends Run Command (evidence: `README.md`)
- Systems Manager route → EC2 instances: executes commands on (evidence: `README.md`)
- EC2 instances → Flask JSON API: hosts deployed app (evidence: `README.md`)
- Flask JSON API → Runtime dependencies: uses packages
- API clients → Flask JSON API: requests endpoints (evidence: `README.md`)
- Flask JSON API → API clients: returns JSON (evidence: `README.md`)
