Amazon Bedrock (AI)
AI features use Amazon Bedrock with Claude models (often via inference profile IDs in us. regions).
Configuration
- Environment variables on Lambda (e.g.
BEDROCK_MODEL_ID) and IAM permissions forbedrock:InvokeModel. - Prompts are maintained in
backend/lambda-functions/bedrock_prompts.pyand wired inedr-api-handler.py. - See repository
backend/BEDROCK_SETUP.md,BEDROCK_MODEL_ACCESS.md, andAI_PROMPTS.md.
Modes
- Standard analysis — JSON output (summary, classification, key indicators, …).
- RAG analysis — When Pinecone MITRE index is configured, retrieval augments the prompt (
SYSTEM_PROMPT_AI_ANALYSIS_RAG).
Follow-up chat
- General questions use
SYSTEM_PROMPT_AI_CHAT. - Short verdict-style questions use
SYSTEM_PROMPT_AI_CHAT_VERDICTfor a compact, consistent layout.
Redeploy Lambda after changing prompts: backend/deploy-lambda-with-rag.ps1.