You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document provides a comprehensive breakdown of all AWS resources and components that make up the Zama API Platform infrastructure, deployed using Terraform with a modular, separated state file approach.
π Infrastructure Summary
Category
Count
Key Services
Networking
23 resources
VPC, Subnets, NAT Gateways, Security Groups
Compute
15 resources
ECS Fargate, ALB, Auto Scaling
Observability
17 resources
CloudWatch, SNS, Alarms
Security
8 resources
Secrets Manager, IAM Roles
Total
63 AWS resources
Across 4 isolated modules
π― Architecture Principles
Modular Design with Separated State Files
4 Independent Modules: Each with isolated Terraform state files
Reduced Blast Radius: Changes in one module don't affect others
Parallel Development: Teams can work on different components simultaneously
Selective Deployments: Update only specific infrastructure components
High Availability & Resilience
Multi-AZ Deployment: Resources distributed across 2 availability zones
Auto Scaling: Automatic scaling based on CPU/Memory utilization
Health Monitoring: Comprehensive health checks at multiple levels
graph TD
A[ECS Tasks] --> B[CloudWatch Logs]
A --> C[CloudWatch Metrics]
C --> D[CloudWatch Alarms]
D --> E[SNS Topic]
E --> F[Email Notifications]
B --> G[Log Metric Filters]
G --> H[Custom Metrics]
H --> D
Loading
π Resource Dependencies
Module Dependencies
Networking (Independent)
β
Secrets (Independent)
β
Observability (Depends on: Networking)
β
Compute (Depends on: Networking, Secrets, Observability)
ποΈ Infrastructure Characteristics
High Availability Features
Multi-AZ Deployment: Resources span 2 availability zones
Auto Scaling: Automatic scaling between 1-5 instances
Health Checks: Multiple layers of health monitoring
Load Balancing: Traffic distribution across healthy instances
Graceful Degradation: Isolated component failures
Security Implementations
Network Isolation: Private subnets for application workloads
Least Privilege IAM: Minimal required permissions
Secrets Management: Encrypted storage of sensitive data
Security Groups: Layer 4 firewall rules
VPC Flow Logs: Network traffic monitoring
Encrypted Storage: S3 and Secrets Manager encryption
Scalability Design
Horizontal Scaling: Auto scaling based on CPU/Memory
Vertical Scaling: Configurable CPU/Memory per task
Load Distribution: ALB distributes traffic evenly
Service Discovery: Dynamic service registration
Stateless Design: No persistent storage dependencies
Operational Excellence
Comprehensive Monitoring: 12 CloudWatch alarms
Centralized Logging: Structured JSON logs
Automated Alerts: Email notifications for issues
Infrastructure as Code: All resources defined in Terraform
Separated State: Isolated state files for safer operations
π― Key Design Decisions
Why ECS Fargate over EKS?
Lower Operational Overhead: No control plane management
Faster Setup: Simpler for demonstration purposes
Cost Effective: Pay only for running tasks
AWS Native: Better integration with AWS services
Why Kong Konnect (SaaS) over Self-Hosted?
Zero Infrastructure: No gateway infrastructure to manage