# ruyanga/aws-lab1 architecture

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

- Interactive diagram: https://gitdiagram.com/ruyanga/aws-lab1
- Repository: https://github.com/ruyanga/aws-lab1

## Overview

This repository defines AWS engineer onboarding as infrastructure: an administrator bootstraps Git sync, then merges to main drive CloudFormation updates from the deployment file and onboarding template. The template provisions permission boundaries, groups, users, generated initial passwords, and an optional CloudTrail audit trail with an S3 bucket. Engineers receive credentials out of band. The evidence script verifies access, boundary enforcement, audit history, and boundary drift. Relationships below follow the README; source excerpts were not available, so implementation details are not inferred.

Main entry points: [`templates/onboarding.yaml`](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml) (Onboarding stack), [`evidence.sh`](https://github.com/ruyanga/aws-lab1/blob/main/evidence.sh) (Access evidence checks), [`bootstrap/gitsync-bootstrap.yaml`](https://github.com/ruyanga/aws-lab1/blob/main/bootstrap/gitsync-bootstrap.yaml) (Git sync bootstrap), [`deployment-file.yaml`](https://github.com/ruyanga/aws-lab1/blob/main/deployment-file.yaml) (Deployment configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gitops["GitOps deployment"]
  node_codeconnections{{"CodeConnections"}}
  node_gitsync{{"CloudFormation Git sync"}}
  node_deployconfig["Deployment configuration"]
  node_bootstrap["Git sync bootstrap"]
  node_onboarding["Onboarding stack<br/>[onboarding.yaml]"]
end

subgraph group_access["Identity onboarding"]
  node_boundaries["Permission boundaries<br/>[onboarding.yaml]"]
  node_groups["IAM groups<br/>[onboarding.yaml]"]
  node_users["IAM users<br/>[onboarding.yaml]"]
  node_secrets["Initial passwords<br/>[onboarding.yaml]"]
  node_secretsmanager{{"Secrets Manager"}}
end

subgraph group_audit["Audit and verification"]
  node_cloudtrail["CloudTrail trail<br/>[onboarding.yaml]"]
  node_auditbucket[("Encrypted audit bucket<br/>[onboarding.yaml]")]
  node_evidence["Access evidence checks<br/>[evidence.sh]"]
  node_iam{{"IAM policy simulator"}}
  node_eventhistory{{"CloudTrail event history"}}
end

node_administrator(("AWS administrator"))
node_github(("GitHub main"))
node_engineers(("Engineers"))
node_securechannel{{"Secure out-of-band channel"}}

node_administrator -->|"deploys once"| node_bootstrap
node_bootstrap -->|"creates connection"| node_codeconnections
node_bootstrap -->|"configures roles"| node_gitsync
node_github -->|"authorizes"| node_codeconnections
node_github -->|"merge triggers"| node_gitsync
node_gitsync -->|"reads"| node_deployconfig
node_deployconfig -->|"selects template"| node_onboarding
node_gitsync -->|"updates stack"| node_onboarding
node_onboarding -->|"defines"| node_boundaries
node_onboarding -->|"defines"| node_groups
node_onboarding -->|"defines"| node_users
node_onboarding -->|"generates passwords"| node_secrets
node_secrets -->|"stores passwords"| node_secretsmanager
node_onboarding -->|"configures"| node_cloudtrail
node_cloudtrail -->|"writes audit logs"| node_auditbucket
node_engineers -->|"receives credentials"| node_securechannel
node_secretsmanager -->|"password retrieved"| node_securechannel
node_administrator -->|"runs checks"| node_evidence
node_evidence -->|"simulates access"| node_iam
node_evidence -->|"lists changes"| node_eventhistory
node_evidence -->|"checks boundaries"| node_users
node_evidence -->|"temporarily tests policy ceiling"| node_groups

click node_deployconfig "https://github.com/ruyanga/aws-lab1/blob/main/deployment-file.yaml"
click node_bootstrap "https://github.com/ruyanga/aws-lab1/blob/main/bootstrap/gitsync-bootstrap.yaml"
click node_onboarding "https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml"
click node_boundaries "https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml"
click node_groups "https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml"
click node_users "https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml"
click node_secrets "https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml"
click node_cloudtrail "https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml"
click node_auditbucket "https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml"
click node_evidence "https://github.com/ruyanga/aws-lab1/blob/main/evidence.sh"

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_codeconnections,node_gitsync,node_deployconfig,node_bootstrap,node_onboarding toneBlue
class node_boundaries,node_groups,node_users,node_secrets,node_secretsmanager toneAmber
class node_cloudtrail,node_auditbucket,node_evidence,node_iam,node_eventhistory toneMint
class node_administrator,node_github,node_engineers,node_securechannel toneIndigo
```

## Components

### GitOps deployment

- **CodeConnections**
- **CloudFormation Git sync**
- [Deployment configuration](https://github.com/ruyanga/aws-lab1/blob/main/deployment-file.yaml): `deployment-file.yaml`
- [Git sync bootstrap](https://github.com/ruyanga/aws-lab1/blob/main/bootstrap/gitsync-bootstrap.yaml): `bootstrap/gitsync-bootstrap.yaml`
- [Onboarding stack](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml): `templates/onboarding.yaml`

### Identity onboarding

- [Permission boundaries](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml): `templates/onboarding.yaml`
- [IAM groups](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml): `templates/onboarding.yaml`
- [IAM users](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml): `templates/onboarding.yaml`
- [Initial passwords](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml): `templates/onboarding.yaml`
- **Secrets Manager**

### Audit and verification

- [CloudTrail trail](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml): `templates/onboarding.yaml`
- [Encrypted audit bucket](https://github.com/ruyanga/aws-lab1/blob/main/templates/onboarding.yaml): `templates/onboarding.yaml`
- [Access evidence checks](https://github.com/ruyanga/aws-lab1/blob/main/evidence.sh): `evidence.sh`
- **IAM policy simulator**
- **CloudTrail event history**

### Other components

- **AWS administrator**
- **GitHub main**
- **Engineers**
- **Secure out-of-band channel**

## Connections

- AWS administrator → Git sync bootstrap: deploys once (evidence: `README.md`)
- Git sync bootstrap → CodeConnections: creates connection (evidence: `README.md`)
- Git sync bootstrap → CloudFormation Git sync: configures roles (evidence: `README.md`)
- GitHub main → CodeConnections: authorizes (evidence: `README.md`)
- GitHub main → CloudFormation Git sync: merge triggers (evidence: `README.md`)
- CloudFormation Git sync → Deployment configuration: reads (evidence: `README.md`)
- Deployment configuration → Onboarding stack: selects template (evidence: `README.md`)
- CloudFormation Git sync → Onboarding stack: updates stack (evidence: `README.md`)
- Onboarding stack → Permission boundaries: defines (evidence: `README.md`)
- Onboarding stack → IAM groups: defines (evidence: `README.md`)
- Onboarding stack → IAM users: defines (evidence: `README.md`)
- Onboarding stack → Initial passwords: generates passwords (evidence: `README.md`)
- Initial passwords → Secrets Manager: stores passwords (evidence: `README.md`)
- Onboarding stack → CloudTrail trail: configures (evidence: `README.md`)
- CloudTrail trail → Encrypted audit bucket: writes audit logs (evidence: `README.md`)
- Engineers → Secure out-of-band channel: receives credentials (evidence: `README.md`)
- Secrets Manager → Secure out-of-band channel: password retrieved (evidence: `README.md`)
- AWS administrator → Access evidence checks: runs checks (evidence: `README.md`)
- Access evidence checks → IAM policy simulator: simulates access (evidence: `README.md`)
- Access evidence checks → CloudTrail event history: lists changes (evidence: `README.md`)
- Access evidence checks → IAM users: checks boundaries (evidence: `README.md`)
- Access evidence checks → IAM groups: temporarily tests policy ceiling (evidence: `README.md`)
