Threat Designer is an AI-driven agent that automates and streamlines the threat modeling process for secure system design. Harnessing the power of large language models (LLMs), it analyzes system architectures, identifies potential security threats, and generates detailed threat models—empowering developers and security professionals to incorporate security from the earliest stages of development.
Experience Threat Designer instantly in your browser - no deployment required!
Lightning Mode provides:
- ✅ Core AI-powered threat modeling
- ✅ Instant access - runs entirely in your browser
- ✅ Perfect for evaluation and quick threat assessments
- ✅ No AWS account or infrastructure needed
📖 Lightning Mode Quick Start Guide
- 📖 Read the AWS Blog Post
- ⭐ Star this repo to support the project
- 📚 Getting started Guide
- Architecture Analysis - Submit architecture diagrams and analyze for threats
- Interactive Editing - Update threat modeling results via the user interface
- Iterative Refinement - Replay threat modeling based on your edits and additional input
- Multiple Export Formats - Export results in PDF, DOCX, or JSON format
- AI Assistant (Sentry) - Interact with a built-in assistant to dive deep into threat models
- Threat Catalog - Explore and manage past threat models
AWS Services Used:
- AWS Amplify
- Amazon API Gateway
- Amazon Cognito
- AWS Lambda
- Amazon Bedrock AgentCore Runtime
- Amazon DynamoDB
- Amazon S3
Required Tools:
The following tools must be installed on your local machine:
- Node.js (v18 or later) and npm
- curl
- jq
- Python (v3.12 or later) and pip
- Terraform CLI
- Docker running
- AWS CLI configured with appropriate credentials
AI Model Provider:
Threat Designer supports two AI providers. Choose one based on your preference:
You must enable access to the following models in your AWS region:
- Claude 4.6 Opus
- Claude 4.5 Sonnet
- Claude 4.5 Haiku
To enable Claude models, follow the instructions here. Make sure you are already subscribed to the models otherwise you will receive an AccessDeniedException exception whe using the application.
Note: If deploying in a non-US region, verify the inference profile ID for your region. See Supported Regions and models for inference profiles.
You'll need:
- A valid OpenAI API key
- Access to GPT-5.2 or GPT-5 Mini models
You'll be prompted to enter your API key during deployment.
- Clone the Repository
git clone https://github.com/awslabs/threat-designer.git
cd threat-designer- Make the deployment script executable:
chmod +x deployment.sh- Export AWS credentials
# Option I: Export AWS temporary credentials
export AWS_ACCESS_KEY_ID="your_temp_access_key"
export AWS_SECRET_ACCESS_KEY="your_temp_secret_key"
export AWS_SESSION_TOKEN="your_temp_session_token"
export AWS_DEFAULT_REGION="your_region"
# Option II: Export AWS Profile
export AWS_PROFILE="your_profile_name"- Run the deployment:
./deployment.shDuring deployment, you'll be prompted to:
- Select your AI model provider (Amazon Bedrock or OpenAI)
- Enter your OpenAI API key (if using OpenAI)
- Provide a valid email address for user credentials
- Choose whether to enable Sentry AI Assistant
Note: A user will be created in Amazon Cognito User Pool and temporary credentials will be sent to the configured email address.
After successful deployment, you can find the Login URL in the output:
Application Login page: https://dev.xxxxxxxxxxxxxxxx.amplifyapp.comThreat Designer supports two AI providers that can be selected during deployment:
Select AI model provider:
1) Amazon Bedrock (Claude) (default)
2) OpenAI (GPT-5.2)
Used Models:
- Claude 4.X family models
Key Characteristics:
- Reasoning: Hybrid model
- Reasoning Levels: None, Low, Medium, High, Max (maps to different reasoning token budgets or adaptive effort levels)
Note: Models listed in the
adaptive_thinking_modelsTerraform variable (e.g., Claude Opus 4.6) use adaptive thinking with effort levels (low,medium,high,max) instead of token budgets. For these models, thereasoning_budgetconfiguration is ignored — the reasoning level from the UI is mapped directly to an effort string. Standard models continue to use token-budget-based reasoning as before.Note: Claude Opus 4.6 supports a maximum output of 128K tokens, while other Claude 4.x family models support up to 64K tokens. If switching between models, make sure to update the
max_tokensconfiguration accordingly to avoid API errors.
Used Models:
- GPT-5 Mini (default) - Faster and more cost-effective
- GPT-5.2 - Maximum reasoning capability
Key Characteristics:
- Reasoning: Always enabled (built-in capability that cannot be disabled)
- Reasoning Levels: Low, Medium, High (maps to OpenAI's reasoning effort)
To use OpenAI:
- Select option
2when prompted for model provider during deployment - Enter your OpenAI API key when prompted
- The system will configure both Threat Designer and Sentry to use OpenAI
To switch between Amazon Bedrock and OpenAI:
- Redeploy the solution using
./deployment.sh - Select a different provider when prompted
Important: Existing conversation sessions from one provider cannot be continued with a different provider. You'll need to start new threat modeling sessions after switching.
Sentry can perform real-time web searches to research CVEs, vulnerabilities, and security topics using Tavily. This feature is optional and requires a Tavily API key.
During deployment, you will be prompted:
Enter your Tavily API key (optional, press Enter to skip):
(Enables web search and content extraction in Sentry assistant)
- With API key: Sentry gains access to
tavily_searchandtavily_extracttools for real-time security research - Without API key: Sentry works normally but cannot perform web searches
- Sign up at tavily.com
- Navigate to your dashboard to get your API key
- Keys start with
tvly-prefix
When enabled, Sentry can:
- Search for CVEs and vulnerability information
- Research threat intelligence and attack techniques
- Look up technical security documentation
- Extract content from security advisories and research papers
Web search is focused on security-related topics and will not search for general information, people, or organizations.
Sentry is an AI-powered assistant that helps you analyze and explore threat models through conversational interaction. This feature is optional and can be enabled or disabled during deployment.
When you run ./deployment.sh, you will be prompted:
Enable Sentry AI Assistant? (y/n, default: y)
- Enable (y): Deploys the full Sentry infrastructure including Amazon Bedrock AgentCore Runtime, DynamoDB session table, and ECR repository. The Assistant drawer will be available in the UI.
- Disable (n): Skips Sentry infrastructure deployment. The Assistant drawer will be hidden from the UI, and core threat modeling features will continue to work normally.
To disable Sentry:
- Update the
.deployment.configfile in the project root:
ENABLE_SENTRY=false- Redeploy the solution
To enable Sentry:
- Update the
.deployment.configfile in the project root:
ENABLE_SENTRY=true- Redeploy the solution
-
Empty the Architecture Bucket, following instructions here
-
Make the destroy script executable:
chmod +x destroy.sh- Export AWS credentials
# Option I: Export AWS temporary credentials
export AWS_ACCESS_KEY_ID="your_temp_access_key"
export AWS_SECRET_ACCESS_KEY="your_temp_secret_key"
export AWS_SESSION_TOKEN="your_temp_session_token"
export AWS_DEFAULT_REGION="your_region"
# Option II: Export AWS Profile
export AWS_PROFILE="your_profile_name"- Execute the script:
./destroy.shSee CONTRIBUTING for more information.
This library is licensed under the Apache License. See the LICENSE file.

