# meetdav33/aws-cicd-demo-infra architecture

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

- Interactive diagram: https://gitdiagram.com/meetdav33/aws-cicd-demo-infra
- Repository: https://github.com/meetdav33/aws-cicd-demo-infra

## Overview

This repository defines AWS infrastructure for a separate application repository. Its documented workflow runs from a push to the application’s main branch through GitHub Actions OIDC authentication, artifact upload, SSM deployment to EC2, and delivery through an ALB. Terraform also generates the application files and deployment workflow. The README documents these relationships, but no Terraform source excerpts were available to verify finer-grained resource wiring.

Main entry points: [`ec2.tf`](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/ec2.tf) (EC2 Instance), [`iam.tf`](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/iam.tf) (Actions IAM Role), [`alb.tf`](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/alb.tf) (Application Load Balancer), [`s3.tf`](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/s3.tf) (Deployment S3 Bucket)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generated["Generated App Files"]
  node_generated_files["Generated Workflow And Page<br/>[generated_files.tf]"]
  node_artifact["ZIP Artifact"]
end

subgraph group_identity["Identity And Permissions"]
  node_oidc["GitHub OIDC Provider<br/>[oidc.tf]"]
  node_actions_role["Actions IAM Role<br/>[iam.tf]"]
  node_ec2_role["EC2 Role And Profile<br/>[iam.tf]"]
end

subgraph group_deployment["Deployment Runtime"]
  node_bucket[("Deployment S3 Bucket<br/>[s3.tf]")]
  node_ssm["Systems Manager<br/>[ec2.tf]"]
  node_ec2["EC2 Instance<br/>[ec2.tf]"]
end

subgraph group_serving["Web Serving"]
  node_apache["Apache Web Server<br/>[ec2.tf]"]
  node_security_groups["Security Groups<br/>[security-group.tf]"]
  node_alb["Application Load Balancer<br/>[alb.tf]"]
end

node_app_repo(("Application Repository"))
node_github_actions(("GitHub Actions"))
node_browser(("Internet User"))

node_generated_files -->|"copied into"| node_app_repo
node_app_repo -->|"push triggers"| node_github_actions
node_github_actions -->|"creates ZIP"| node_artifact
node_github_actions -->|"authenticates through"| node_oidc
node_oidc -->|"trusts identity"| node_actions_role
node_github_actions -->|"assumes role"| node_actions_role
node_actions_role -->|"permits upload"| node_bucket
node_actions_role -->|"permits command"| node_ssm
node_github_actions -->|"uploads artifact"| node_bucket
node_github_actions -->|"sends deployment command"| node_ssm
node_ec2_role -->|"attached to"| node_ec2
node_ec2 -->|"managed by"| node_ssm
node_ssm -->|"dispatches command"| node_ec2
node_ec2 -->|"downloads artifact"| node_bucket
node_ec2 -->|"updates web page"| node_apache
node_alb -->|"routes traffic"| node_ec2
node_browser -->|"requests page"| node_alb
node_security_groups -->|"controls access"| node_ec2
node_security_groups -->|"controls access"| node_alb

click node_generated_files "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/generated_files.tf"
click node_oidc "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/oidc.tf"
click node_actions_role "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/iam.tf"
click node_ec2_role "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/iam.tf"
click node_bucket "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/s3.tf"
click node_ssm "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/ec2.tf"
click node_ec2 "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/ec2.tf"
click node_apache "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/ec2.tf"
click node_security_groups "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/security-group.tf"
click node_alb "https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/alb.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_generated_files,node_artifact,node_browser toneBlue
class node_oidc,node_actions_role,node_ec2_role toneAmber
class node_bucket,node_ssm,node_ec2 toneMint
class node_apache,node_security_groups,node_alb toneRose
class node_app_repo,node_github_actions toneIndigo
```

## Components

### Generated App Files

- [Generated Workflow And Page](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/generated_files.tf): `generated_files.tf`
- **ZIP Artifact**

### Identity And Permissions

- [GitHub OIDC Provider](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/oidc.tf): `oidc.tf`
- [Actions IAM Role](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/iam.tf): `iam.tf`
- [EC2 Role And Profile](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/iam.tf): `iam.tf`

### Deployment Runtime

- [Deployment S3 Bucket](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/s3.tf): `s3.tf`
- [Systems Manager](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/ec2.tf): `ec2.tf`
- [EC2 Instance](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/ec2.tf): `ec2.tf`

### Web Serving

- [Apache Web Server](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/ec2.tf): `ec2.tf`
- [Security Groups](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/security-group.tf): `security-group.tf`
- [Application Load Balancer](https://github.com/meetdav33/aws-cicd-demo-infra/blob/main/alb.tf): `alb.tf`

### Other components

- **Application Repository**
- **GitHub Actions**
- **Internet User**

## Connections

- Generated Workflow And Page → Application Repository: copied into
- Application Repository → GitHub Actions: push triggers
- GitHub Actions → ZIP Artifact: creates ZIP
- GitHub Actions → GitHub OIDC Provider: authenticates through
- GitHub OIDC Provider → Actions IAM Role: trusts identity
- GitHub Actions → Actions IAM Role: assumes role
- Actions IAM Role → Deployment S3 Bucket: permits upload
- Actions IAM Role → Systems Manager: permits command
- GitHub Actions → Deployment S3 Bucket: uploads artifact
- GitHub Actions → Systems Manager: sends deployment command
- EC2 Role And Profile → EC2 Instance: attached to
- EC2 Instance → Systems Manager: managed by
- Systems Manager → EC2 Instance: dispatches command
- EC2 Instance → Deployment S3 Bucket: downloads artifact
- EC2 Instance → Apache Web Server: updates web page
- Application Load Balancer → EC2 Instance: routes traffic
- Internet User → Application Load Balancer: requests page
- Security Groups → EC2 Instance: controls access
- Security Groups → Application Load Balancer: controls access
