# ndaziramiyep/aws_lab_01 architecture

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

- Interactive diagram: https://gitdiagram.com/ndaziramiyep/aws_lab_01
- Repository: https://github.com/ndaziramiyep/aws_lab_01

## Overview

This repository is an instructional AWS IAM lab, with an optional code-driven path to provision, test, and remove the lab environment. The main workflow assigns users to least-privilege groups, whose policies determine access, then signs in as each user to verify allowed and denied actions. The README also documents a CloudFormation template and AWS CLI script for creating users, groups, policies, memberships, and optional S3/EC2 resources. No source excerpts were provided, so relationships below rely on README statements only.

Main entry points: [`scripts/lab.sh`](https://github.com/ndaziramiyep/aws_lab_01/blob/main/scripts/lab.sh) (Lab CLI script), [`templates/iam-lab.yaml`](https://github.com/ndaziramiyep/aws_lab_01/blob/main/templates/iam-lab.yaml) (Lab stack template), [`policies/AmazonS3ReadOnlyAccess.yaml`](https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/AmazonS3ReadOnlyAccess.yaml) (S3 read policy), [`policies/AmazonEC2ReadOnlyAccess.yaml`](https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/AmazonEC2ReadOnlyAccess.yaml) (EC2 read policy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["IAM learning lab"]
  node_iam_console["IAM console"]
  node_users_groups["Users and groups"]
  node_membership["Group membership"]
  node_signin_test["Sign-in checks"]
end

subgraph group_deployment["Lab deployment"]
  node_lab_script["Lab CLI script<br/>[lab.sh]"]
  node_cloudformation["Lab stack template<br/>[iam-lab.yaml]"]
  node_lab_identities["Lab identities<br/>[iam-lab.yaml]"]
  node_lab_resources["S3 and EC2<br/>[iam-lab.yaml]"]
end

subgraph group_permissions["Access policies"]
  node_s3_policy["S3 read policy"]
  node_ec2_read_policy["EC2 read policy"]
  node_ec2_admin_policy["EC2 admin policy"]
end

node_learner(("Learner"))
node_aws_cli["AWS CLI"]
node_aws_iam["AWS IAM"]
node_aws_resources[("AWS resources")]

node_learner -->|"opens"| node_iam_console
node_iam_console -->|"inspects"| node_users_groups
node_learner -->|"adds users"| node_membership
node_membership -->|"updates"| node_users_groups
node_users_groups -->|"uses"| node_s3_policy
node_users_groups -->|"uses"| node_ec2_read_policy
node_users_groups -->|"uses"| node_ec2_admin_policy
node_learner -->|"signs in"| node_signin_test
node_signin_test -->|"checks access"| node_aws_resources
node_learner -->|"runs"| node_lab_script
node_lab_script -->|"invokes"| node_aws_cli
node_lab_script -->|"deploys"| node_cloudformation
node_cloudformation -->|"defines"| node_lab_identities
node_cloudformation -->|"defines"| node_lab_resources
node_lab_script -->|"tests and deletes"| node_aws_resources

click node_s3_policy "https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/AmazonS3ReadOnlyAccess.yaml"
click node_ec2_read_policy "https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/AmazonEC2ReadOnlyAccess.yaml"
click node_ec2_admin_policy "https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/EC2-Admin-Policy.yaml"
click node_lab_script "https://github.com/ndaziramiyep/aws_lab_01/blob/main/scripts/lab.sh"
click node_cloudformation "https://github.com/ndaziramiyep/aws_lab_01/blob/main/templates/iam-lab.yaml"
click node_lab_identities "https://github.com/ndaziramiyep/aws_lab_01/blob/main/templates/iam-lab.yaml"
click node_lab_resources "https://github.com/ndaziramiyep/aws_lab_01/blob/main/templates/iam-lab.yaml"

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_iam_console,node_users_groups,node_membership,node_signin_test toneBlue
class node_lab_script,node_cloudformation,node_lab_identities,node_lab_resources,node_aws_resources toneAmber
class node_s3_policy,node_ec2_read_policy,node_ec2_admin_policy toneMint
class node_learner,node_aws_cli,node_aws_iam toneIndigo
```

## Components

### IAM learning lab

- **IAM console**
- **Users and groups**
- **Group membership**
- **Sign-in checks**

### Lab deployment

- [Lab CLI script](https://github.com/ndaziramiyep/aws_lab_01/blob/main/scripts/lab.sh): `scripts/lab.sh`
- [Lab stack template](https://github.com/ndaziramiyep/aws_lab_01/blob/main/templates/iam-lab.yaml): `templates/iam-lab.yaml`
- [Lab identities](https://github.com/ndaziramiyep/aws_lab_01/blob/main/templates/iam-lab.yaml): `templates/iam-lab.yaml`
- [S3 and EC2](https://github.com/ndaziramiyep/aws_lab_01/blob/main/templates/iam-lab.yaml): `templates/iam-lab.yaml`

### Access policies

- [S3 read policy](https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/AmazonS3ReadOnlyAccess.yaml): `policies/AmazonS3ReadOnlyAccess.yaml`
- [EC2 read policy](https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/AmazonEC2ReadOnlyAccess.yaml): `policies/AmazonEC2ReadOnlyAccess.yaml`
- [EC2 admin policy](https://github.com/ndaziramiyep/aws_lab_01/blob/main/policies/EC2-Admin-Policy.yaml): `policies/EC2-Admin-Policy.yaml`

### Other components

- **Learner**
- **AWS CLI**
- **AWS IAM**
- **AWS resources**

## Connections

- Learner → IAM console: opens (evidence: `README.md`)
- IAM console → Users and groups: inspects (evidence: `README.md`)
- Learner → Group membership: adds users (evidence: `README.md`)
- Group membership → Users and groups: updates (evidence: `README.md`)
- Users and groups → S3 read policy: uses (evidence: `README.md`)
- Users and groups → EC2 read policy: uses (evidence: `README.md`)
- Users and groups → EC2 admin policy: uses (evidence: `README.md`)
- Learner → Sign-in checks: signs in (evidence: `README.md`)
- Sign-in checks → AWS resources: checks access (evidence: `README.md`)
- Learner → Lab CLI script: runs (evidence: `README.md`)
- Lab CLI script → AWS CLI: invokes (evidence: `README.md`)
- Lab CLI script → Lab stack template: deploys (evidence: `README.md`)
- Lab stack template → Lab identities: defines (evidence: `README.md`)
- Lab stack template → S3 and EC2: defines (evidence: `README.md`)
- Lab CLI script → AWS resources: tests and deletes (evidence: `README.md`)
