COMPLETED
This document describes the cloud infrastructure, Kubernetes orchestration, and CI/CD pipelines configured for the AI Companion App.
The infrastructure is defined using Terraform and includes:
| Service | Type | Purpose |
|---|---|---|
| RDS PostgreSQL | db.r6g.large | User data, conversations |
| Aurora PostgreSQL | Serverless v2 | Vector embeddings storage |
| ElastiCache Redis | cache.r6g.large | Session cache, real-time data |
| S3 Buckets | Standard | Assets, logs, model storage |
| Stage | Job | Description |
|---|---|---|
| 1 | lint-and-test | Code linting (flake8, black, isort), type checking (mypy), unit tests |
| 2 | validate-prompts | YAML validation, variable extraction, injection pattern detection |
| 3 | validate-flows | Flow YAML structure, connectivity check |
| 4 | build-and-push | Build Docker images, push to ECR |
| 5 | terraform-deploy | Provision/update AWS infrastructure |
| 6 | deploy-kubernetes | Deploy to EKS, rolling update |
| 7 | deploy-prompts | Sync prompts to S3 config bucket |
| 8 | deploy-flows | Sync flows to S3 config bucket |
| 9 | smoke-tests | Health check verification |