How aws-samples/bedrock-claude-chat works
Main Components
a. Client Layer:
• React Frontend Application (CloudFront + S3)
• Web Application Firewall (WAF)
• Authentication Layer (Cognito)
b. API Layer:
• API Gateway
• WebSocket API for real-time communication
• Lambda Functions with Web Adapter
c. Core Services:
• Amazon Bedrock (Claude Models)
• Bedrock Knowledge Bases
• OpenSearch Serverless
• DynamoDB for conversation storage
d. Processing Pipeline:
• EventBridge Pipes
• Step Functions for knowledge embedding
• Lambda Functions for various processors
User Flow
• User → CloudFront → React App → API Gateway → Lambda → Bedrock
• Authentication flow through Cognito
• WebSocket connections for real-time chat
Data Flow
• Knowledge Base ingestion pipeline
• Document processing and embedding flow
• Conversation storage and retrieval
Administrative Flow
• Analytics and monitoring pathways
• User management flows
Frontend Zone
• React application components
• i18n support
• UI components structure
Backend Zone
• FastAPI implementation
• Repository pattern
• Business logic layer
Infrastructure Zone
• AWS service configurations
• Security groups and IAM roles
• Network layout
Deployment Flow
CI/CD pipeline:
• GitHub Actions workflows
• CDK deployment process
• Infrastructure as Code components