# cxmiller21/aws-eks-microservices architecture

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

- Interactive diagram: https://gitdiagram.com/cxmiller21/aws-eks-microservices
- Repository: https://github.com/cxmiller21/aws-eks-microservices

## Overview

#### Purpose and Entry Points
This is infrastructure-as-code for running the Online Boutique microservice demo on either local Kind or AWS EKS, with GitOps and a Grafana-based observability stack. Primary entry points are local bootstrap via `scripts/create-kind-cluster.sh`, AWS provisioning in `terraform/eks/main.tf`, and workload installation through `scripts/install-online-boutique.sh`.

#### Deployment Targets
Local development uses Kind configuration and Kubernetes manifests: `kubernetes/local/cluster-config.yaml`, `kubernetes/local/online-boutique.yaml`, and local Helm values under `kubernetes/helm/local/values/`. AWS deployment is centered on EKS Terraform plus EKS-specific Helm values: `terraform/eks/main.tf`, `terraform/eks/kubernetes.tf`, `kubernetes/helm/eks/values/`.

#### AWS Foundation
The EKS Terraform stack establishes the cluster and its AWS integration, including IAM, Kubernetes resources, ArgoCD, and S3-backed infrastructure: `terraform/eks/main.tf`, `terraform/eks/iam.tf`, `terraform/eks/s3.tf`. This is the boundary between AWS account resources and in-cluster workloads. It relies on AWS EKS, IAM, S3, and likely ALB-related resources; `scripts/install-eks-alb-controller.sh` supports ingress load-balancer integration.

#### GitOps and Application Delivery
ArgoCD is installed/configured as the deployment controller, with an Application manifest pointing it at the Online Boutique workload: `kubernetes/argocd/argocd.yaml`, `kubernetes/argocd/applications/online-boutique.yaml`, `terraform/eks/argocd.tf`. ArgoCD forms the control-plane boundary between repository manifests and Kubernetes reconciliation.

#### Workload Layer
The primary application is Google’s Online Boutique microservice deployment, represented separately for generic/EKS and local use: `kubernetes/online-boutique/kubernetes-manifests.yaml`, `kubernetes/local/online-boutique.yaml`, `kubernetes/online-boutique/tracing/kubernetes-manifests-tracing.yaml`. Traffic reaches services through Kubernetes exposure and, on EKS, AWS ALB ingress. Load-test manifests provide synthetic application traffic: `kubernetes/local/microservices-loadtest.yaml`.

#### Observability Pipeline
The repository deploys Grafana, Prometheus/Mimir metrics, Loki logs, Tempo traces, and Promtail collection. EKS-oriented distributed stack values are in `kubernetes/helm/eks/values/grafana-loki-distributed-values.yaml`, `kubernetes/helm/eks/values/grafana-mimir-distributed-values.yaml`, and `kubernetes/helm/eks/values/grafana-tempo-distributed-values.yaml`. Promtail runs as a daemonset to collect node/container logs: `kubernetes/daemonset/promtail.yaml`. Grafana queries Loki, Tempo, and Mimir/Prometheus; tracing manifests instrument or configure the application-side trace path.

#### Lifecycle and Cleanup Automation
Shell scripts orchestrate common operational sequences, while Terraform cleanup automation addresses AWS resource teardown. Key operations are `scripts/install-grafana-lgtm-stack.sh`, `scripts/otle-local-app.sh`, and `scripts/cleanup-eks.py`. A separate Terraform Lambda stack schedules or emits cleanup notifications using EventBridge and SNS: `terraform/cleanup-lambda/eventbridge.tf`, `terraform/cleanup-lambda/sns.tf`, `terraform/cleanup-lambda/src/cleanup-eks/index.py`.

Main entry points: [`scripts/install-grafana-lgtm-stack.sh`](https://github.com/cxmiller21/aws-eks-microservices/blob/main/scripts/install-grafana-lgtm-stack.sh) (LGTM stack installer), [`kubernetes/online-boutique/kubernetes-manifests.yaml`](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/online-boutique/kubernetes-manifests.yaml) (Online Boutique manifests), [`kubernetes/helm/eks/values/grafana-loki-distributed-values.yaml`](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-loki-distributed-values.yaml) (Loki), [`kubernetes/helm/eks/values/grafana-tempo-distributed-values.yaml`](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-tempo-distributed-values.yaml) (Tempo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_local["Local Kind"]
  node_kind_bootstrap["Kind bootstrap<br/>shell script"]
  node_kind_config["Kind cluster config<br/>Kind config"]
  node_kind_cluster{{"Local Kind cluster<br/>Kubernetes cluster"}}
  node_local_boutique["Local Online Boutique<br/>Kubernetes manifests"]
end

subgraph group_aws["AWS / EKS"]
  node_eks_terraform["EKS foundation<br/>Terraform stack<br/>[main.tf]"]
  node_eks_cluster{{"AWS EKS cluster<br/>managed Kubernetes"}}
  node_iam["IAM integration<br/>Terraform resources<br/>[iam.tf]"]
  node_s3[("S3 infrastructure<br/>Terraform resources<br/>[s3.tf]")]
  node_alb_setup["ALB controller setup<br/>shell script"]
  node_alb_ingress["ALB ingress<br/>AWS load balancing"]
end

subgraph group_delivery["GitOps Delivery"]
  node_eks_kubernetes["EKS Kubernetes resources<br/>Terraform Kubernetes<br/>[kubernetes.tf]"]
  node_argocd{{"ArgoCD control plane<br/>GitOps controller<br/>[argocd.yaml]"}}
  node_boutique_app["Online Boutique application<br/>ArgoCD Application"]
  node_boutique_manifests["Online Boutique manifests<br/>Kubernetes manifests"]
end

subgraph group_observability["Observability"]
  node_tracing_manifests["Application tracing<br/>Kubernetes manifests"]
  node_lgtm_installer["LGTM stack installer<br/>shell script"]
  node_loki[("Loki<br/>log backend")]
  node_mimir[("Mimir / Prometheus<br/>metrics backend")]
  node_tempo[("Tempo<br/>trace backend")]
  node_promtail["Promtail<br/>log collector daemonset<br/>[promtail.yaml]"]
  node_grafana["Grafana<br/>observability UI"]
end

subgraph group_operations["Lifecycle Automation"]
  node_cleanup_lambda{{"EKS cleanup Lambda<br/>cleanup function<br/>[index.py]"}}
  node_cleanup_schedule["Cleanup schedule<br/>EventBridge rules<br/>[eventbridge.tf]"]
  node_cleanup_notifications["Cleanup notifications<br/>SNS resources<br/>[sns.tf]"]
end

node_kind_bootstrap -->|"uses"| node_kind_config
node_kind_config -->|"creates"| node_kind_cluster
node_local_boutique -->|"deploys to"| node_kind_cluster
node_eks_terraform -->|"provisions"| node_eks_cluster
node_iam -->|"authorizes"| node_eks_cluster
node_s3 -->|"supports"| node_eks_terraform
node_alb_setup -->|"installs"| node_alb_ingress
node_alb_ingress -->|"routes into"| node_eks_cluster
node_eks_kubernetes -->|"applies resources to"| node_eks_cluster
node_eks_kubernetes -->|"provisions"| node_argocd
node_argocd -->|"reconciles"| node_boutique_app
node_boutique_app -->|"targets"| node_boutique_manifests
node_boutique_manifests -->|"deploys to"| node_eks_cluster
node_tracing_manifests -->|"instruments"| node_boutique_manifests
node_tracing_manifests -->|"exports traces"| node_tempo
node_lgtm_installer -->|"installs"| node_loki
node_lgtm_installer -->|"installs"| node_mimir
node_lgtm_installer -->|"installs"| node_tempo
node_promtail -->|"sends logs"| node_loki
node_eks_cluster -->|"runs"| node_promtail
node_grafana -->|"queries logs"| node_loki
node_grafana -->|"queries metrics"| node_mimir
node_grafana -->|"queries traces"| node_tempo
node_cleanup_schedule -->|"triggers"| node_cleanup_lambda
node_cleanup_lambda -.->|"tears down"| node_eks_cluster
node_cleanup_schedule -->|"publishes"| node_cleanup_notifications

click node_kind_bootstrap "https://github.com/cxmiller21/aws-eks-microservices/blob/main/scripts/create-kind-cluster.sh"
click node_kind_config "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/local/cluster-config.yaml"
click node_local_boutique "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/local/online-boutique.yaml"
click node_eks_terraform "https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/main.tf"
click node_iam "https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/iam.tf"
click node_s3 "https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/s3.tf"
click node_alb_setup "https://github.com/cxmiller21/aws-eks-microservices/blob/main/scripts/install-eks-alb-controller.sh"
click node_eks_kubernetes "https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/kubernetes.tf"
click node_argocd "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/argocd/argocd.yaml"
click node_boutique_app "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/argocd/applications/online-boutique.yaml"
click node_boutique_manifests "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/online-boutique/kubernetes-manifests.yaml"
click node_tracing_manifests "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/online-boutique/tracing/kubernetes-manifests-tracing.yaml"
click node_lgtm_installer "https://github.com/cxmiller21/aws-eks-microservices/blob/main/scripts/install-grafana-lgtm-stack.sh"
click node_loki "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-loki-distributed-values.yaml"
click node_mimir "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-mimir-distributed-values.yaml"
click node_tempo "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-tempo-distributed-values.yaml"
click node_promtail "https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/daemonset/promtail.yaml"
click node_cleanup_lambda "https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/cleanup-lambda/src/cleanup-eks/index.py"
click node_cleanup_schedule "https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/cleanup-lambda/eventbridge.tf"
click node_cleanup_notifications "https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/cleanup-lambda/sns.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_kind_bootstrap,node_kind_config,node_kind_cluster,node_local_boutique toneBlue
class node_eks_terraform,node_eks_cluster,node_iam,node_s3,node_alb_setup,node_alb_ingress toneAmber
class node_eks_kubernetes,node_argocd,node_boutique_app,node_boutique_manifests toneMint
class node_tracing_manifests,node_lgtm_installer,node_loki,node_mimir,node_tempo,node_promtail,node_grafana toneRose
class node_cleanup_lambda,node_cleanup_schedule,node_cleanup_notifications toneIndigo
```

## Components

### Local Kind

- [Kind bootstrap](https://github.com/cxmiller21/aws-eks-microservices/blob/main/scripts/create-kind-cluster.sh): shell script · Creates the local development cluster. · `scripts/create-kind-cluster.sh`
- [Kind cluster config](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/local/cluster-config.yaml): Kind config · `kubernetes/local/cluster-config.yaml`
- **Local Kind cluster**: Kubernetes cluster
- [Local Online Boutique](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/local/online-boutique.yaml): Kubernetes manifests · `kubernetes/local/online-boutique.yaml`

### AWS / EKS

- [EKS foundation](https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/main.tf): Terraform stack · Provisions the EKS deployment foundation. · `terraform/eks/main.tf`
- **AWS EKS cluster**: managed Kubernetes
- [IAM integration](https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/iam.tf): Terraform resources · `terraform/eks/iam.tf`
- [S3 infrastructure](https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/s3.tf): Terraform resources · `terraform/eks/s3.tf`
- [ALB controller setup](https://github.com/cxmiller21/aws-eks-microservices/blob/main/scripts/install-eks-alb-controller.sh): shell script · `scripts/install-eks-alb-controller.sh`
- **ALB ingress**: AWS load balancing · Exposes EKS workloads externally.

### GitOps Delivery

- [EKS Kubernetes resources](https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/eks/kubernetes.tf): Terraform Kubernetes · `terraform/eks/kubernetes.tf`
- [ArgoCD control plane](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/argocd/argocd.yaml): GitOps controller · `kubernetes/argocd/argocd.yaml`
- [Online Boutique application](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/argocd/applications/online-boutique.yaml): ArgoCD Application · Declares the workload reconciliation target. · `kubernetes/argocd/applications/online-boutique.yaml`
- [Online Boutique manifests](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/online-boutique/kubernetes-manifests.yaml): Kubernetes manifests · `kubernetes/online-boutique/kubernetes-manifests.yaml`

### Observability

- [Application tracing](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/online-boutique/tracing/kubernetes-manifests-tracing.yaml): Kubernetes manifests · `kubernetes/online-boutique/tracing/kubernetes-manifests-tracing.yaml`
- [LGTM stack installer](https://github.com/cxmiller21/aws-eks-microservices/blob/main/scripts/install-grafana-lgtm-stack.sh): shell script · `scripts/install-grafana-lgtm-stack.sh`
- [Loki](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-loki-distributed-values.yaml): log backend · `kubernetes/helm/eks/values/grafana-loki-distributed-values.yaml`
- [Mimir / Prometheus](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-mimir-distributed-values.yaml): metrics backend · `kubernetes/helm/eks/values/grafana-mimir-distributed-values.yaml`
- [Tempo](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/helm/eks/values/grafana-tempo-distributed-values.yaml): trace backend · `kubernetes/helm/eks/values/grafana-tempo-distributed-values.yaml`
- [Promtail](https://github.com/cxmiller21/aws-eks-microservices/blob/main/kubernetes/daemonset/promtail.yaml): log collector daemonset · Collects node and container logs. · `kubernetes/daemonset/promtail.yaml`
- **Grafana**: observability UI · Queries metrics, logs, and traces.

### Lifecycle Automation

- [EKS cleanup Lambda](https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/cleanup-lambda/src/cleanup-eks/index.py): cleanup function · `terraform/cleanup-lambda/src/cleanup-eks/index.py`
- [Cleanup schedule](https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/cleanup-lambda/eventbridge.tf): EventBridge rules · Triggers cleanup automation and notifications. · `terraform/cleanup-lambda/eventbridge.tf`
- [Cleanup notifications](https://github.com/cxmiller21/aws-eks-microservices/blob/main/terraform/cleanup-lambda/sns.tf): SNS resources · `terraform/cleanup-lambda/sns.tf`

## Connections

- Kind bootstrap → Kind cluster config: uses
- Kind cluster config → Local Kind cluster: creates
- Local Online Boutique → Local Kind cluster: deploys to
- EKS foundation → AWS EKS cluster: provisions
- IAM integration → AWS EKS cluster: authorizes
- S3 infrastructure → EKS foundation: supports
- ALB controller setup → ALB ingress: installs
- ALB ingress → AWS EKS cluster: routes into
- EKS Kubernetes resources → AWS EKS cluster: applies resources to
- EKS Kubernetes resources → ArgoCD control plane: provisions
- ArgoCD control plane → Online Boutique application: reconciles
- Online Boutique application → Online Boutique manifests: targets
- Online Boutique manifests → AWS EKS cluster: deploys to
- Application tracing → Online Boutique manifests: instruments
- Application tracing → Tempo: exports traces
- LGTM stack installer → Loki: installs
- LGTM stack installer → Mimir / Prometheus: installs
- LGTM stack installer → Tempo: installs
- Promtail → Loki: sends logs
- AWS EKS cluster → Promtail: runs
- Grafana → Loki: queries logs
- Grafana → Mimir / Prometheus: queries metrics
- Grafana → Tempo: queries traces
- Cleanup schedule → EKS cleanup Lambda: triggers
- EKS cleanup Lambda → AWS EKS cluster: tears down
- Cleanup schedule → Cleanup notifications: publishes
