# bpbpublications/practical-generative-ai-on-aws architecture

> Architecture diagram of the GitHub repository bpbpublications/practical-generative-ai-on-aws, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bpbpublications/practical-generative-ai-on-aws
- Repository: https://github.com/bpbpublications/practical-generative-ai-on-aws

## Overview

This repository is a companion collection of Jupyter examples for the book *Practical Generative AI on AWS*, not a single application. A reader follows chapter examples to explore Bedrock APIs, knowledge-base RAG, agents, open-source frameworks, model customization and evaluation, and SageMaker JumpStart. The graph preserves those documented learning branches and the sampled agent helper and action functions. Most notebook internals were not sampled, so links from examples to AWS services reflect README descriptions rather than inspected notebook calls.

Main entry points: [`Chapter 06/agents-with-api/agents_helper_util.py`](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/agents_helper_util.py) (Agent Helper), [`Chapter 06/agents-with-api/Example61.ipynb`](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/Example61.ipynb) (Agent API Examples), [`Chapter 04/Example41.ipynb`](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example41.ipynb) (API Example 41), [`Chapter 04/Example42.ipynb`](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example42.ipynb) (API Example 42)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bedrock["Bedrock APIs"]
  node_example41["API Example 41<br/>[Example41.ipynb]"]
  node_example42["API Example 42<br/>[Example42.ipynb]"]
  node_example43["API Example 43<br/>[Example43.ipynb]"]
  node_example44["API Example 44<br/>[Example44.ipynb]"]
end

subgraph group_rag["Knowledge Bases"]
  node_example51["RAG Example 51<br/>[Example51.ipynb]"]
  node_example52["RAG Example 52<br/>[Example52.ipynb]"]
  node_kb_utility["KB Utilities<br/>[utility.py]"]
end

subgraph group_agents["Managed Agents"]
  node_agent_api["Agent API Examples<br/>[Example61.ipynb]"]
  node_agent_console["Console Agent<br/>[Example62.ipynb]"]
  node_strands_agent["Strands Example<br/>[Example63.ipynb]"]
  node_agent_helper["Agent Helper"]
  node_agent_config["Agent Configuration<br/>[constants.py]"]
  node_order_actions["Order Actions<br/>[order_lambda.py]"]
  node_return_actions["Return Actions"]
end

subgraph group_frameworks["Agent Frameworks"]
  node_langchain["LangChain Examples<br/>[Example71.ipynb]"]
  node_llamaindex["LlamaIndex Examples<br/>[Example72.ipynb]"]
  node_orchestration["Advanced Workflows<br/>[Example73.ipynb]"]
  node_index_features["Indexing Features<br/>[Example74.ipynb]"]
  node_multi_agent["Multi-Agent Example<br/>[Example75.ipynb]"]
end

subgraph group_models["Models And Evaluation"]
  node_fine_tuning["Bedrock Customization<br/>[Example81.ipynb]"]
  node_custom_models["Model Customization<br/>[Example82.ipynb]"]
  node_evaluation["RAG Evaluation<br/>[Example111.ipynb]"]
end

subgraph group_sagemaker["SageMaker JumpStart"]
  node_jumpstart_foundation["JumpStart Models<br/>[Example131.ipynb]"]
  node_jumpstart_deploy["JumpStart Deployment<br/>[Example132.ipynb]"]
  node_jumpstart_tuning["JumpStart Fine-Tuning<br/>[Example133.ipynb]"]
end

node_reader(("Reader"))
node_bedrock_service{{"Amazon Bedrock"}}
node_knowledge_base{{"Bedrock Knowledge Bases"}}
node_aws_agents{{"Bedrock Agents"}}
node_lambda_service{{"AWS Lambda"}}
node_dynamodb[("Amazon DynamoDB")]
node_frameworks_external{{"Open-Source Frameworks"}}
node_jumpstart_service{{"SageMaker JumpStart"}}

node_reader -->|"runs"| node_example41
node_reader -->|"runs"| node_example42
node_reader -->|"runs"| node_example43
node_reader -->|"runs"| node_example44
node_reader -->|"runs"| node_example51
node_reader -->|"runs"| node_example52
node_reader -->|"runs"| node_agent_api
node_reader -->|"runs"| node_agent_console
node_reader -->|"runs"| node_strands_agent
node_reader -->|"runs"| node_langchain
node_reader -->|"runs"| node_llamaindex
node_reader -->|"runs"| node_orchestration
node_reader -->|"runs"| node_index_features
node_reader -->|"runs"| node_multi_agent
node_reader -->|"runs"| node_fine_tuning
node_reader -->|"runs"| node_custom_models
node_reader -->|"runs"| node_evaluation
node_reader -->|"runs"| node_jumpstart_foundation
node_reader -->|"runs"| node_jumpstart_deploy
node_reader -->|"runs"| node_jumpstart_tuning
node_example41 -->|"uses APIs"| node_bedrock_service
node_example42 -->|"uses APIs"| node_bedrock_service
node_example43 -->|"uses APIs"| node_bedrock_service
node_example44 -->|"uses APIs"| node_bedrock_service
node_example51 -->|"demonstrates RAG"| node_knowledge_base
node_example52 -->|"demonstrates RAG"| node_knowledge_base
node_agent_api -->|"creates agents"| node_aws_agents
node_agent_console -->|"creates agents"| node_aws_agents
node_agent_api -->|"uses helpers"| node_agent_helper
node_agent_helper -->|"imports settings"| node_agent_config
node_agent_helper -->|"packages Lambda"| node_order_actions
node_agent_helper -->|"creates functions"| node_lambda_service
node_agent_helper -->|"creates table"| node_dynamodb
node_order_actions -->|"reads and writes"| node_dynamodb
node_return_actions -->|"handles action events"| node_aws_agents
node_strands_agent -->|"uses Strands"| node_frameworks_external
node_langchain -->|"uses LangChain"| node_frameworks_external
node_llamaindex -->|"uses LlamaIndex"| node_frameworks_external
node_orchestration -->|"uses frameworks"| node_frameworks_external
node_index_features -->|"uses LlamaIndex"| node_frameworks_external
node_multi_agent -->|"uses Strands"| node_frameworks_external
node_fine_tuning -->|"customizes models"| node_bedrock_service
node_evaluation -->|"evaluates RAG"| node_bedrock_service
node_jumpstart_foundation -->|"uses models"| node_jumpstart_service
node_jumpstart_deploy -->|"deploys models"| node_jumpstart_service
node_jumpstart_tuning -->|"fine-tunes models"| node_jumpstart_service

click node_example41 "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example41.ipynb"
click node_example42 "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example42.ipynb"
click node_example43 "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example43.ipynb"
click node_example44 "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example44.ipynb"
click node_example51 "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2005/Example51.ipynb"
click node_example52 "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2005/Example52.ipynb"
click node_kb_utility "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2005/utility.py"
click node_agent_api "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/Example61.ipynb"
click node_agent_console "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-console/Example62.ipynb"
click node_strands_agent "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/Example63.ipynb"
click node_agent_helper "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/agents_helper_util.py"
click node_agent_config "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/constants.py"
click node_order_actions "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/order_lambda.py"
click node_return_actions "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/returnrefund_lambda.py"
click node_langchain "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example71.ipynb"
click node_llamaindex "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example72.ipynb"
click node_orchestration "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example73.ipynb"
click node_index_features "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example74.ipynb"
click node_multi_agent "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example75.ipynb"
click node_fine_tuning "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2008/Example81.ipynb"
click node_custom_models "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2008/Example82.ipynb"
click node_evaluation "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2011/Example111.ipynb"
click node_jumpstart_foundation "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2013/Example131.ipynb"
click node_jumpstart_deploy "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2013/Example132.ipynb"
click node_jumpstart_tuning "https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2013/Example133.ipynb"

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_example41,node_example42,node_example43,node_example44 toneBlue
class node_example51,node_example52,node_kb_utility,node_dynamodb toneAmber
class node_agent_api,node_agent_console,node_strands_agent,node_agent_helper,node_agent_config,node_order_actions,node_return_actions toneMint
class node_langchain,node_llamaindex,node_orchestration,node_index_features,node_multi_agent toneRose
class node_fine_tuning,node_custom_models,node_evaluation,node_reader,node_bedrock_service,node_knowledge_base,node_aws_agents,node_lambda_service,node_frameworks_external,node_jumpstart_service toneIndigo
class node_jumpstart_foundation,node_jumpstart_deploy,node_jumpstart_tuning toneTeal
```

## Components

### Bedrock APIs

- [API Example 41](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example41.ipynb): `Chapter 04/Example41.ipynb`
- [API Example 42](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example42.ipynb): `Chapter 04/Example42.ipynb`
- [API Example 43](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example43.ipynb): `Chapter 04/Example43.ipynb`
- [API Example 44](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2004/Example44.ipynb): `Chapter 04/Example44.ipynb`

### Knowledge Bases

- [RAG Example 51](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2005/Example51.ipynb): `Chapter 05/Example51.ipynb`
- [RAG Example 52](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2005/Example52.ipynb): `Chapter 05/Example52.ipynb`
- [KB Utilities](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2005/utility.py): `Chapter 05/utility.py`

### Managed Agents

- [Agent API Examples](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/Example61.ipynb): `Chapter 06/agents-with-api/Example61.ipynb`
- [Console Agent](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-console/Example62.ipynb): `Chapter 06/agents-with-console/Example62.ipynb`
- [Strands Example](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/Example63.ipynb): `Chapter 06/agents-with-api/Example63.ipynb`
- [Agent Helper](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/agents_helper_util.py): `Chapter 06/agents-with-api/agents_helper_util.py`
- [Agent Configuration](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/constants.py): `Chapter 06/agents-with-api/constants.py`
- [Order Actions](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/order_lambda.py): `Chapter 06/agents-with-api/order_lambda.py`
- [Return Actions](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2006/agents-with-api/returnrefund_lambda.py): `Chapter 06/agents-with-api/returnrefund_lambda.py`

### Agent Frameworks

- [LangChain Examples](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example71.ipynb): `Chapter 07/Example71.ipynb`
- [LlamaIndex Examples](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example72.ipynb): `Chapter 07/Example72.ipynb`
- [Advanced Workflows](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example73.ipynb): `Chapter 07/Example73.ipynb`
- [Indexing Features](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example74.ipynb): `Chapter 07/Example74.ipynb`
- [Multi-Agent Example](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2007/Example75.ipynb): `Chapter 07/Example75.ipynb`

### Models And Evaluation

- [Bedrock Customization](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2008/Example81.ipynb): `Chapter 08/Example81.ipynb`
- [Model Customization](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2008/Example82.ipynb): `Chapter 08/Example82.ipynb`
- [RAG Evaluation](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2011/Example111.ipynb): `Chapter 11/Example111.ipynb`

### SageMaker JumpStart

- [JumpStart Models](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2013/Example131.ipynb): `Chapter 13/Example131.ipynb`
- [JumpStart Deployment](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2013/Example132.ipynb): `Chapter 13/Example132.ipynb`
- [JumpStart Fine-Tuning](https://github.com/bpbpublications/practical-generative-ai-on-aws/blob/main/Chapter%2013/Example133.ipynb): `Chapter 13/Example133.ipynb`

### Other components

- **Reader**
- **Amazon Bedrock**
- **Bedrock Knowledge Bases**
- **Bedrock Agents**
- **AWS Lambda**
- **Amazon DynamoDB**
- **Open-Source Frameworks**
- **SageMaker JumpStart**

## Connections

- Reader → API Example 41: runs (evidence: `README.md`)
- Reader → API Example 42: runs (evidence: `README.md`)
- Reader → API Example 43: runs (evidence: `README.md`)
- Reader → API Example 44: runs (evidence: `README.md`)
- Reader → RAG Example 51: runs (evidence: `README.md`)
- Reader → RAG Example 52: runs (evidence: `README.md`)
- Reader → Agent API Examples: runs (evidence: `README.md`)
- Reader → Console Agent: runs (evidence: `README.md`)
- Reader → Strands Example: runs (evidence: `README.md`)
- Reader → LangChain Examples: runs (evidence: `README.md`)
- Reader → LlamaIndex Examples: runs (evidence: `README.md`)
- Reader → Advanced Workflows: runs (evidence: `README.md`)
- Reader → Indexing Features: runs (evidence: `README.md`)
- Reader → Multi-Agent Example: runs (evidence: `README.md`)
- Reader → Bedrock Customization: runs (evidence: `README.md`)
- Reader → Model Customization: runs (evidence: `README.md`)
- Reader → RAG Evaluation: runs (evidence: `README.md`)
- Reader → JumpStart Models: runs (evidence: `README.md`)
- Reader → JumpStart Deployment: runs (evidence: `README.md`)
- Reader → JumpStart Fine-Tuning: runs (evidence: `README.md`)
- API Example 41 → Amazon Bedrock: uses APIs (evidence: `README.md`)
- API Example 42 → Amazon Bedrock: uses APIs (evidence: `README.md`)
- API Example 43 → Amazon Bedrock: uses APIs (evidence: `README.md`)
- API Example 44 → Amazon Bedrock: uses APIs (evidence: `README.md`)
- RAG Example 51 → Bedrock Knowledge Bases: demonstrates RAG (evidence: `README.md`)
- RAG Example 52 → Bedrock Knowledge Bases: demonstrates RAG (evidence: `README.md`)
- Agent API Examples → Bedrock Agents: creates agents (evidence: `README.md`)
- Console Agent → Bedrock Agents: creates agents (evidence: `README.md`)
- Agent API Examples → Agent Helper: uses helpers (evidence: `README.md`)
- Agent Helper → Agent Configuration: imports settings (evidence: `Chapter 06/agents-with-api/agents_helper_util.py`)
- Agent Helper → Order Actions: packages Lambda (evidence: `Chapter 06/agents-with-api/agents_helper_util.py`)
- Agent Helper → AWS Lambda: creates functions (evidence: `Chapter 06/agents-with-api/agents_helper_util.py`)
- Agent Helper → Amazon DynamoDB: creates table (evidence: `Chapter 06/agents-with-api/agents_helper_util.py`)
- Order Actions → Amazon DynamoDB: reads and writes (evidence: `Chapter 06/agents-with-api/order_lambda.py`)
- Return Actions → Bedrock Agents: handles action events (evidence: `README.md`)
- Strands Example → Open-Source Frameworks: uses Strands (evidence: `README.md`)
- LangChain Examples → Open-Source Frameworks: uses LangChain (evidence: `README.md`)
- LlamaIndex Examples → Open-Source Frameworks: uses LlamaIndex (evidence: `README.md`)
- Advanced Workflows → Open-Source Frameworks: uses frameworks (evidence: `README.md`)
- Indexing Features → Open-Source Frameworks: uses LlamaIndex (evidence: `README.md`)
- Multi-Agent Example → Open-Source Frameworks: uses Strands (evidence: `README.md`)
- Bedrock Customization → Amazon Bedrock: customizes models (evidence: `README.md`)
- RAG Evaluation → Amazon Bedrock: evaluates RAG (evidence: `README.md`)
- JumpStart Models → SageMaker JumpStart: uses models (evidence: `README.md`)
- JumpStart Deployment → SageMaker JumpStart: deploys models (evidence: `README.md`)
- JumpStart Fine-Tuning → SageMaker JumpStart: fine-tunes models (evidence: `README.md`)
