Serve e-commerce portal globally with low latency and DDoS protection
CloudFront caches web assets at 600+ edge locations, shields from layer 7 attacks
1000+ Gbps capacity, WAF integrated
| Field | Value | Unit | Description |
|---|---|---|---|
| Requests/month | 10M | requests | |
| Bandwidth | 500 | GB/mo | |
| Data out | $0.085 | /GB |
Distribute inbound traffic across ECS instances for high availability
ALB listens on port 443 (HTTPS), routes to ECS target groups by path
Cross-AZ, health checks every 30s
| Field | Value | Unit | Description |
|---|---|---|---|
| LB capacity | 4000 | New conn/sec | |
| Data processed | 100 | GB/mo |
Run containerized chatbot engine, API backend, e-commerce app without managing servers
ECS hosts 4x t3.large tasks, 2x running, 2x standby. Auto-scales on CPU/memory
CPU: 4 vCPU, RAM: 8 GB, Fargate Spot for cost savings
| Field | Value | Unit | Description |
|---|---|---|---|
| vCPU-hours/mo | 288 | hours | |
| Memory GB-hours | 576 | hours | |
| Cost/month | $1200 | estimated |
Serve product catalog, checkout page, order history
ECS serves React/Vue frontend + Node.js backend, cached by CloudFront
Same t3.large spec, shared capacity with chatbot
| Field | Value | Unit | Description |
|---|---|---|---|
| Concurrent users | 500 | peak | |
| Session store | ElastiCache | Redis |
Backup ALB for failover; ensures service continuity if AZ1 NAT fails
Passive standby, health check failures trigger Route 53 failover
Cross-AZ load balancing
| Field | Value | Unit | Description |
|---|---|---|---|
| LB capacity | 4000 | New conn/sec |
Standby ECS tasks ready to assume load if AZ1 fails
Same container images as AZ1, pulls from ECR, auto-starts on AZ1 failure
Warm standby, pre-warmed connection pools
| Field | Value | Unit | Description |
|---|---|---|---|
| vCPU-hours/mo | 288 | hours | |
| Memory GB-hours | 576 | hours |
Invoke Claude Sonnet 4.6 for intelligent chatbot responses without managing inference infrastructure
Bedrock handles scaling, model updates, token pricing. Supports RAG prompting with context injection
On-demand pricing, no capacity reservation, context window 200K tokens
| Field | Value | Unit | Description |
|---|---|---|---|
| Tokens input | 100K | per request | |
| Tokens output | 500 | per response | |
| Requests/day | 10000 | estimated |
Handle Twilio & Stripe webhook payloads; trigger Lambda processors with high availability
API Gateway stores webhook endpoints, triggers Lambda synchronously, logs all requests
REST APIs, rate limiting 10K req/sec per account
| Field | Value | Unit | Description |
|---|---|---|---|
| Requests/month | 1M | webhooks | |
| Data transferred | 5 | GB/mo |
Decouple message ingestion from chatbot processing; enable auto-scaling based on queue depth
SQS stores messages up to 15 days, ECS polls every 5 sec, auto-deletes on successful processing
Standard queue, visibility timeout 30s, batch size 10
| Field | Value | Unit | Description |
|---|---|---|---|
| Messages/day | 50K | avg | |
| Message size | 5 | KB | |
| Retention | 1 | day |
Route order.created events to multiple handlers (notifications, logistics, analytics)
EventBridge rules match on event patterns, invoke Lambda targets asynchronously
Rule-based routing, DLQ support, event replay
| Field | Value | Unit | Description |
|---|---|---|---|
| Events/day | 5K | orders | |
| Targets per event | 3 | avg |
Store conversation history, session tokens, rate limit counters with low-latency access
DynamoDB reads/writes at single-digit milliseconds, auto-scales on demand
On-demand pricing, point-in-time recovery enabled, TTL 30 days
| Field | Value | Unit | Description |
|---|---|---|---|
| Items stored | 100K | sessions | |
| Reads/sec | 500 | avg | |
| Writes/sec | 100 | avg |
Store user accounts, products, orders, inventory with ACID compliance
Aurora replicates across AZs synchronously, auto-failover in <30 sec, automatic backups
db.t4g.medium x2 (read replica), 100 GB storage, daily backups
| Field | Value | Unit | Description |
|---|---|---|---|
| Instances | 2 | primary + reader | |
| Storage | 100 | GB | |
| Backup storage | 300 | GB |
Store vectorized knowledge base (product docs, FAQ, policies) for semantic search (RAG)
OpenSearch performs vector similarity search in milliseconds, supports hybrid filtering
Serverless, autoscale 4-40 OCUs, vector engine enabled
| Field | Value | Unit | Description |
|---|---|---|---|
| Documents | 10K | indexed | |
| Vector dim | 1536 | text-embedding | |
| Search QPS | 100 | avg |
Store source documents (PDFs, markdown) for knowledge base; serve static assets
S3 stores docs, Lambda indexes into OpenSearch, CloudFront caches public assets
Versioning enabled, lifecycle policy 90 days, encryption
| Field | Value | Unit | Description |
|---|---|---|---|
| Docs stored | 100 | GB | |
| Request rate | 1000 | req/month | |
| Transfer out | 50 | GB/mo |
Parse Twilio & Stripe webhooks, validate signatures, enqueue messages to SQS
Lambda invoked by API Gateway, runs Node.js code, no cold start overhead with provisioned concurrency
128 MB memory, 10 sec timeout, 1000 concurrent executions
| Field | Value | Unit | Description |
|---|---|---|---|
| Invocations/month | 1M | webhooks | |
| Duration avg | 500 | ms | |
| Memory | 128 | MB |
Consume Stripe webhook, create order in Aurora, emit EventBridge event
Lambda runs transaction-safe order creation, handles idempotency keys
1024 MB memory, 30 sec timeout
| Field | Value | Unit | Description |
|---|---|---|---|
| Invocations/month | 100K | orders | |
| Duration avg | 2 | sec | |
| Cost/month | $50 | estimated |
Emit proactive WhatsApp notifications for order updates, shipping status changes
Lambda consumes EventBridge events, calls Twilio API to send notifications
512 MB memory, 15 sec timeout, concurrent: 100
| Field | Value | Unit | Description |
|---|---|---|---|
| Invocations/day | 5K | events | |
| Notifications sent | 5K | per day | |
| Cost/month | $20 | estimated |
Cache rate limit counters, session tokens, user preferences for sub-millisecond access
Redis cluster, 3 nodes (1 primary + 2 replicas), auto-failover on node failure
cache.t4g.micro x3, eviction policy: allkeys-lru, persistence disabled
| Field | Value | Unit | Description |
|---|---|---|---|
| Throughput | 100K | ops/sec | |
| Memory | 1 | GB | |
| Multi-AZ failover | Yes |
Broadcast system alerts (high error rates, DynamoDB throttling, etc.) to Lark
SNS topics with Lark webhook subscription; fan-out to multiple handlers
Standard topic, message retention: none
| Field | Value | Unit | Description |
|---|---|---|---|
| Messages/day | 1K | alerts | |
| Endpoints | 1 | Lark webhook |
Real-time ops dashboard: chat escalations, order notifications, system health
Receives SNS messages, shows alerts in Lark channels, allows admin chat takeover
Lark bot @SIM, rate limit: 10 msg/sec
| Step | Description |
|---|---|
| 1 | Send WhatsApp message |
| 2 | POST webhook (message received) |
| 3 | Invoke webhook processor |
| 4 | Put message in queue |
| 5 | Consume message from queue |
| 6 | Invoke Claude with RAG context (OpenSearch + S3) |
| 7 | Send reply message to customer |
| 8 | Browse e-commerce site |
| 9 | Route web traffic to ALB |
| 10 | Forward to ECS web app & query Aurora |
| 11 | POST payment webhook & create order |
| 12 | Order event triggers notifications & logistics |
Click any section below to expand detailed architecture documentation.
The chatbot uses Amazon Bedrock to invoke Claude Sonnet 4.6, leveraging a 200K token context window for rich conversational understanding. Requests include RAG-retrieved knowledge base context, conversation history, and customer metadata.
Before invoking Bedrock, ECS queries OpenSearch Serverless to retrieve relevant knowledge base documents. This grounds Claude's responses in actual product data and company policies.
DynamoDB stores conversation history (last 10 messages) per session. On each new message, ECS retrieves history and includes it in Claude's context.
Customer browses e-commerce site (served by CloudFront + ECS), adds items to cart, clicks "Checkout".
ECS redirects customer to Stripe Checkout for PCI compliance. Stripe calls API Gateway webhook → Lambda creates order → EventBridge routes to handlers.
EventBridge routes order.created event to Lambda handlers. One creates shipment with logistics provider; another sends proactive WhatsApp notification.
All traffic encrypted in-transit (TLS 1.3). ECS tasks run in private subnets, accessible only via ALB. NAT gateways mask outbound IPs.
Encryption enabled on all storage services using AWS KMS customer-managed keys.
Least-privilege IAM roles per service. ECS pulls secrets at runtime; Lambda has granular DynamoDB/S3 permissions.
Architecture supports common compliance frameworks for E-commerce & FinTech.
All compute layers scale automatically based on demand. ECS tracks CPU/memory; Lambda scales on concurrency; DynamoDB scales on consumed capacity.
Critical services replicated across ap-southeast-5a & ap-southeast-5b. RPO/RTO targets met by synchronous replication.
If entire ap-southeast-5 goes down, recovery involves CloudFormation-based redeploy to ap-southeast-1 or ap-south-1.
P99 latencies maintained below 500 ms for 99% of requests via caching and async processing.