Menu
AWS Architecture Blog·November 5, 2026

Scaling Threat Modeling with AI: TUI's AWS Bedrock Architecture

TUI, a large travel organization, addressed the challenge of scaling threat modeling across 100+ digital product teams with limited security engineers by developing an AI-powered system. This article details the serverless architecture built on Amazon Bedrock, AWS Lambda, and other AWS services, enabling automated, consistent, and significantly faster security assessments. The solution highlights an iterative design process, particularly around intelligent knowledge base selection and agentic threat generation.

Read original on AWS Architecture Blog

TUI faced a significant bottleneck in their security assessment process: a small security team (four engineers) attempting to manually threat model for over 100 product teams. Each manual session was time-consuming (4-6 hours) and inconsistent, leading to a large backlog. To address this, TUI developed an automated threat modeling system leveraging generative AI, specifically Amazon Bedrock with Anthropic's Claude Sonnet 4.5.

Architectural Overview of TUI's Threat Designer

The core of TUI's solution is a serverless architecture deployed on AWS, designed to extend AWS Threat Designer with TUI-specific capabilities. This system replaces manual reviews with an automated workflow that consistently applies TUI's security standards. Key components include:

  • Amazon Bedrock: Utilized for threat analysis and generation, leveraging Claude Sonnet 4.5. It supports configurable extended thinking budgets for deeper analysis.
  • Amazon Bedrock AgentCore runtime: Hosts the agentic workflow as a managed, serverless runtime. This eliminates infrastructure provisioning for the LangGraph agent and supports long-running, isolated sessions.
  • AWS Lambda: Provides serverless backend compute for orchestrating the LangGraph workflow.
  • Amazon DynamoDB: Manages workflow state, enabling resume capabilities for ongoing threat models.
  • Amazon S3: Stores architecture diagrams, the TUI knowledge base, and acts as a web search cache.
  • AWS Amplify & Amazon Cognito: For the React front end and user authentication, respectively.
💡

Agentic Workflows for Complex Tasks

This architecture demonstrates a powerful pattern for integrating generative AI into complex workflows. Instead of relying on a single-pass LLM interaction, an "agentic workflow" breaks down the problem into smaller, manageable steps. The agent uses a set of defined tools (e.g., add threats, delete threats, run gap analysis) and autonomously decides the order of operations, mimicking human problem-solving and allowing for iterative refinement.

Iterative Design: From Brute Force to Intelligent Selection

A crucial learning in TUI's development journey was the optimization of how the LLM interacts with the security standards knowledge base. Initially, loading all 192 standards (338 KB) directly into the prompt failed due to token limits and model confusion from excessive context.

The breakthrough involved a metadata-driven approach. Instead of the full documents, lightweight metadata (keywords, component types, STRIDE categories, relevance scores) for each standard was generated. At runtime, the LLM reviews this 60 KB metadata to select only the ~16 most relevant standards (21 KB of content) for a given architecture, achieving a 94% context reduction. This intelligent selection ensures the model receives focused, relevant information, improving accuracy and reducing costs.

Self-Correcting Agentic Threat Generation

Within the agentic workflow, the "threat generation" node employs a "Reason and Act" pattern using a LangGraph subgraph. The agent uses tools to add, delete, and analyze threats. It initially generates threats using STRIDE, then iteratively refines them against TUI standards, assigning likelihood/impact scores and suggesting mitigations with approved tools. A built-in "tool budget" forces the agent to perform a gap analysis after a set number of generations, preventing infinite loops and ensuring a comprehensive review process, mirroring how human experts work.

AWS BedrockGenerative AIThreat ModelingServerless ArchitectureLangGraphAgentic AISecurity AutomationCloud Architecture

Comments

Loading comments...