# awslabs/aws-well-architected-labs architecture

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

- Interactive diagram: https://gitdiagram.com/awslabs/aws-well-architected-labs
- Repository: https://github.com/awslabs/aws-well-architected-labs

## Overview

This repository is a collection of AWS learning and sample applications, not one unified runtime. The clearest end-to-end workflow in the supplied evidence is the Well-Architected integration: a tagged workload event triggers EC2 recommendation processing, which consults a mapping table, gathers Compute Optimizer and Trusted Advisor findings, and updates workload notes. Other groups represent separate Todo and operations examples. The README was empty; relationships are limited to those shown in excerpts or SOURCE INDEX references.

Main entry points: [`static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js`](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js) (Cost questions), [`static/Common/Code/Serverless-Todo/src/web/app.js`](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/web/app.js) (Todo web client), [`static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js`](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js) (Recommendation orchestration), [`static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js`](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js) (Trusted Advisor costs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_wa["Well-Architected integration"]
  node_wa_handler["Event handler<br/>[app.js]"]
  node_recommendations["Recommendation orchestration"]
  node_mapping_api["Mapping writer<br/>[mappingEngine.js]"]
  node_mapping_queries["Mapping queries<br/>[queries.js]"]
  node_cost_questions["Cost questions<br/>[costQuestion.js]"]
  node_ec2_describe["EC2 details<br/>[describe.js]"]
  node_tag_check["Workload tag match<br/>[checkTag.js]"]
  node_date_helper["Date helper<br/>[date.js]"]
  node_ta_cost["Trusted Advisor costs<br/>[costTA.js]"]
  node_wa_notes["Workload notes updater<br/>[updateNotes.js]"]
end

subgraph group_todo["Serverless Todo"]
  node_todo_web["Todo web client<br/>[app.js]"]
  node_todo_create["Create handler<br/>[app.py]"]
  node_todo_read["Read handler<br/>[app.py]"]
  node_todo_update["Update handler<br/>[app.py]"]
  node_todo_delete["Delete handler<br/>[app.py]"]
end

subgraph group_ops["Operations playbook"]
  node_ops_app["Playbook service<br/>[app.js]"]
end

node_event(("Tagged workload event"))
node_dynamodb[("DynamoDB")]
node_compute_optimizer["Compute Optimizer"]
node_trusted_advisor["Trusted Advisor"]
node_well_architected["Well-Architected Tool"]
node_todo_user(("Todo user"))
node_todo_store[("Todo table")]
node_ops_client(("Operations client"))
node_kms["AWS KMS"]
node_secrets["Secrets Manager"]
node_ops_db[("MySQL database")]

node_event -->|"triggers"| node_wa_handler
node_wa_handler -->|"calls"| node_recommendations
node_recommendations -->|"loads mappings"| node_mapping_queries
node_recommendations -->|"dispatches questions"| node_cost_questions
node_recommendations -->|"gets date"| node_date_helper
node_mapping_api -->|"batch writes"| node_dynamodb
node_mapping_queries -.->|"queries"| node_dynamodb
node_cost_questions -->|"gets recommendations"| node_compute_optimizer
node_cost_questions -->|"reads instance tags"| node_ec2_describe
node_cost_questions -->|"checks tags"| node_tag_check
node_cost_questions -->|"gets findings"| node_ta_cost
node_cost_questions -->|"updates notes"| node_wa_notes
node_ta_cost -->|"reads checks"| node_trusted_advisor
node_ta_cost -->|"reads instance tags"| node_ec2_describe
node_ta_cost -->|"checks tags"| node_tag_check
node_wa_notes -.->|"writes notes"| node_well_architected
node_todo_user -.->|"uses"| node_todo_web
node_todo_web -.->|"posts create"| node_todo_create
node_todo_web -.->|"requests list"| node_todo_read
node_todo_web -.->|"posts edits"| node_todo_update
node_todo_web -.->|"requests delete"| node_todo_delete
node_todo_create -.->|"writes"| node_todo_store
node_todo_read -.->|"reads"| node_todo_store
node_todo_update -->|"updates"| node_todo_store
node_todo_delete -.->|"deletes"| node_todo_store
node_ops_client -.->|"sends requests"| node_ops_app
node_ops_app -->|"encrypts and decrypts"| node_kms
node_ops_app -->|"hydrates credentials"| node_secrets
node_ops_app -->|"reads and writes secrets"| node_ops_db

click node_wa_handler "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/app.js"
click node_recommendations "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js"
click node_mapping_api "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/dynamodb/mappingEngine.js"
click node_mapping_queries "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/dynamodb/queries.js"
click node_cost_questions "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js"
click node_ec2_describe "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/ec2/describe.js"
click node_tag_check "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/ec2/checkTag.js"
click node_date_helper "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/libraries/date.js"
click node_ta_cost "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js"
click node_wa_notes "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/wellarchitected/updateNotes.js"
click node_todo_web "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/web/app.js"
click node_todo_create "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/create/app.py"
click node_todo_read "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/read/app.py"
click node_todo_update "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/update/app.py"
click node_todo_delete "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/delete/app.py"
click node_ops_app "https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Operations/200_Automating_operations_with_playbooks_and_runbooks/Code/src/app.js"

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_wa_handler,node_recommendations,node_mapping_api,node_mapping_queries,node_cost_questions,node_ec2_describe,node_tag_check,node_date_helper,node_ta_cost,node_wa_notes,node_todo_user,node_ops_client toneBlue
class node_todo_web,node_todo_create,node_todo_read,node_todo_update,node_todo_delete,node_dynamodb,node_todo_store,node_ops_db toneAmber
class node_ops_app toneMint
class node_event,node_compute_optimizer,node_trusted_advisor,node_well_architected,node_kms,node_secrets toneIndigo
```

## Components

### Well-Architected integration

- [Event handler](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/app.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/app.js`
- [Recommendation orchestration](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js`
- [Mapping writer](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/dynamodb/mappingEngine.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/dynamodb/mappingEngine.js`
- [Mapping queries](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/dynamodb/queries.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/dynamodb/queries.js`
- [Cost questions](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js`
- [EC2 details](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/ec2/describe.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/ec2/describe.js`
- [Workload tag match](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/ec2/checkTag.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/ec2/checkTag.js`
- [Date helper](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/libraries/date.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/libraries/date.js`
- [Trusted Advisor costs](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js`
- [Workload notes updater](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/wellarchitected/updateNotes.js): `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/wellarchitected/updateNotes.js`

### Serverless Todo

- [Todo web client](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/web/app.js): `static/Common/Code/Serverless-Todo/src/web/app.js`
- [Create handler](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/create/app.py): `static/Common/Code/Serverless-Todo/src/api/create/app.py`
- [Read handler](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/read/app.py): `static/Common/Code/Serverless-Todo/src/api/read/app.py`
- [Update handler](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/update/app.py): `static/Common/Code/Serverless-Todo/src/api/update/app.py`
- [Delete handler](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Common/Code/Serverless-Todo/src/api/delete/app.py): `static/Common/Code/Serverless-Todo/src/api/delete/app.py`

### Operations playbook

- [Playbook service](https://github.com/awslabs/aws-well-architected-labs/blob/main/static/Operations/200_Automating_operations_with_playbooks_and_runbooks/Code/src/app.js): `static/Operations/200_Automating_operations_with_playbooks_and_runbooks/Code/src/app.js`

### Other components

- **Tagged workload event**
- **DynamoDB**
- **Compute Optimizer**
- **Trusted Advisor**
- **Well-Architected Tool**
- **Todo user**
- **Todo table**
- **Operations client**
- **AWS KMS**
- **Secrets Manager**
- **MySQL database**

## Connections

- Tagged workload event → Event handler: triggers (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/app.js`)
- Event handler → Recommendation orchestration: calls (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/app.js`)
- Recommendation orchestration → Mapping queries: loads mappings (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js`)
- Recommendation orchestration → Cost questions: dispatches questions (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js`)
- Recommendation orchestration → Date helper: gets date (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/computeopt/getEC2Recommendations.js`)
- Mapping writer → DynamoDB: batch writes (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/dynamodb/mappingEngine.js`)
- Mapping queries → DynamoDB: queries
- Cost questions → Compute Optimizer: gets recommendations (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js`)
- Cost questions → EC2 details: reads instance tags (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js`)
- Cost questions → Workload tag match: checks tags (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js`)
- Cost questions → Trusted Advisor costs: gets findings (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js`)
- Cost questions → Workload notes updater: updates notes (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/questions/costQuestion.js`)
- Trusted Advisor costs → Trusted Advisor: reads checks (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js`)
- Trusted Advisor costs → EC2 details: reads instance tags (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js`)
- Trusted Advisor costs → Workload tag match: checks tags (evidence: `static/watool/200_Integration_with_AWS_Compute_Optimizer_and_AWS_Trusted_Advisor/Code/integration/src/trustedadvisor/costTA.js`)
- Workload notes updater → Well-Architected Tool: writes notes
- Todo user → Todo web client: uses
- Todo web client → Create handler: posts create
- Todo web client → Read handler: requests list
- Todo web client → Update handler: posts edits
- Todo web client → Delete handler: requests delete
- Create handler → Todo table: writes
- Read handler → Todo table: reads
- Update handler → Todo table: updates (evidence: `static/Common/Code/Serverless-Todo/src/api/update/app.py`)
- Delete handler → Todo table: deletes
- Operations client → Playbook service: sends requests
- Playbook service → AWS KMS: encrypts and decrypts (evidence: `static/Operations/200_Automating_operations_with_playbooks_and_runbooks/Code/src/app.js`)
- Playbook service → Secrets Manager: hydrates credentials (evidence: `static/Operations/200_Automating_operations_with_playbooks_and_runbooks/Code/src/app.js`)
- Playbook service → MySQL database: reads and writes secrets (evidence: `static/Operations/200_Automating_operations_with_playbooks_and_runbooks/Code/src/app.js`)
