AI Companion App - Infrastructure Documentation

Task 2: Infrastructure Setup

COMPLETED

This document describes the cloud infrastructure, Kubernetes orchestration, and CI/CD pipelines configured for the AI Companion App.

1. Cloud Infrastructure (AWS)

The infrastructure is defined using Terraform and includes:

Network Architecture

Compute & Containers

Data Layer

ServiceTypePurpose
RDS PostgreSQLdb.r6g.largeUser data, conversations
Aurora PostgreSQLServerless v2Vector embeddings storage
ElastiCache Rediscache.r6g.largeSession cache, real-time data
S3 BucketsStandardAssets, logs, model storage

Security

2. Kubernetes Orchestration

Cluster Components

ALB
API Server
Memory Service

WebSocket
Tool Agent

Redis
|
PostgreSQL
|
Vector DB

Kubernetes Resources

Auto Scaling

3. CI/CD Pipeline

Pipeline Stages

StageJobDescription
1lint-and-testCode linting (flake8, black, isort), type checking (mypy), unit tests
2validate-promptsYAML validation, variable extraction, injection pattern detection
3validate-flowsFlow YAML structure, connectivity check
4build-and-pushBuild Docker images, push to ECR
5terraform-deployProvision/update AWS infrastructure
6deploy-kubernetesDeploy to EKS, rolling update
7deploy-promptsSync prompts to S3 config bucket
8deploy-flowsSync flows to S3 config bucket
9smoke-testsHealth check verification

Triggers

Deployment Targets

4. Deployment Architecture

5. Files Delivered

6. Next Steps

← Back to Main Index