ontology-for-retail — AWS Architecture

Korean retail/CPG knowledge-graph PoC — request path and backend planes (6 CDK stacks, ap-northeast-2)

ontology-for-retail — AWS Architecture Korean retail/CPG knowledge-graph PoC — request path and backend planes (6 CDK stacks, ap-northeast-2) AWS ap-northeast-2 sg: CloudFront prefix list only Browser · demo user · Architecture component Browser demo user Cognito · User Pool / Hosted UI · Architecture component Cognito User Pool / Hosted UI CloudFront · Lambda@Edge cookie auth · Architecture component · TLS ends here CloudFront Lambda@Edge cookie auth TLS ends here ALB · HTTP :80 origin · AWS ap-northeast-2 › sg: CloudFront prefix list only ALB HTTP :80 origin Web · Next.js 14 · Fargate x2 · AWS ap-northeast-2 Web Next.js 14 · Fargate x2 API · FastAPI · Fargate x2 · AWS ap-northeast-2 · ARM64 API FastAPI · Fargate x2 ARM64 Data Loader · one-off ECS task · AWS ap-northeast-2 · same image Data Loader one-off ECS task same image Neptune · openCypher graph · AWS ap-northeast-2 · IAM SigV4 Neptune openCypher graph IAM SigV4 OpenSearch Serverless · hybrid search index · AWS ap-northeast-2 OpenSearch Serverless hybrid search index Bedrock · Sonnet 4.6 / embed-v4 / rerank-v3 · AWS ap-northeast-2 · Guardrails + KB Bedrock Sonnet 4.6 / embed-v4 / rerank-v3 Guardrails + KB AgentCore Memory · session + user namespaces · AWS ap-northeast-2 AgentCore Memory session + user namespaces HTTPS 302 unauth X-Origin-Auth-Token openCypher memory recall Legend Frontend Backend Database Cloud Security External

Edge & auth

  • • Lambda@Edge inspects cookies on every request
  • • Unauthenticated users 302 to Cognito Hosted UI
  • • ALB security group locked to the CloudFront prefix list

Application

  • • Web (Next.js 14) and API (FastAPI) on ECS Fargate ARM64, 2 replicas each
  • • Same API image doubles as a one-off data loader via command override
  • • Six CDK v2 stacks: network, data, compute, ai, edge, observability

Data & AI

  • • Neptune ontology graph: 25 node classes / 40 relation types
  • • OpenSearch Serverless hybrid search: Nori BM25 + Cohere KNN, RRF k=60
  • • Bedrock Sonnet 4.6, embed-v4, rerank-v3, Guardrails, KB + AgentCore Memory