Skip to main content

Single AWS Architecture (AMWAY)

4 min read

This design reuses the LG H&H architecture: a Next.js frontend, FastAPI backend on ECS Fargate, Bedrock and AgentCore integration, Neptune graph storage, and OpenSearch search. AMWAY adds ABO-tree depth queries, a subscription state machine, multilingual support, and direct-selling policy checks.


1. Architecture Overview​

Expand the diagram to read labels and follow connections.
Diagram

2. AMWAY-specific Components​

ComponentRole
Neptune (700K edges)ABO tree 5-level depth queries (*1..5 openCypher) — +40% vs. LG H&H's 500K
Step Functions (Subscription State Manager)Subscription state machine: Active → Pause → Cancelled / Renewed
Bedrock Guardrails (enhanced)4 topics + direct-selling regulations + minors + health functional food ads
Cohere embed-v4 / rerank-v3.5Korean · Chinese · Japanese · English · Spanish concurrently (more than 100 countries, cohere.rerank-v3-5:0)
OpenSearch multilingual analyzersNori + Smartcn (Chinese) + Kuromoji (Japanese) + Standard

3. Traffic Flow (S9-A ABO Tree Visualization)​

1. Browser → CloudFront → Lambda@Edge (JWT + persona header)
2. CloudFront → Next.js → FastAPI /api/abo-tree?root=$rootId&depth=5
3. FastAPI → Neptune openCypher: MATCH (root)-[:HAS_DOWNLINE*1..5]->(d) ...
4. Result → cytoscape.js JSON
5. Browser rendering + interaction

4. Security & Governance (AMWAY-enhanced)​

ItemImplementation
AuthenticationCognito + Lambda@Edge JWT
AuthorizationPersona × country whitelist (only P5 Compliance can write RegulatorySignal)
PIIABO tree visualization exposes only masked IDs
Guardrails4 topics + direct selling + minors + HFF + multi-country ad-language review
AuditCloudTrail + Audit DynamoDB (Compliance daily activity report)

5. Cost (8-week PoC)​

ItemEstimate
Bedrock SonnetChatbot 15K/month (multilingual lengthens responses)
Cohere multilingual60K/month
Neptuner6g.large 1 node (700K edges)
OpenSearch Serverless3 OCU
Step FunctionsSubscription state processing
Monthly estimateApproximately $5K–$7K USD

6. PoC Milestones (8 weeks)​

WeekWork
1–2Infrastructure + data ingestion (in-house + 49.5K synthetic ABO tree + external)
3S1 · S2 · S3
4S9-A ABO Tree + S10-A subscription
5S5 · S7
6S11-A regulatory + S8 guardrails
7S4 · S6
8Demo rehearsal