System Architecture
The GovTech Multicloud Platform follows a defense-in-depth security model with multiple layers of protection at every level of the infrastructure. The platform is designed for government agencies migrating legacy systems to cloud infrastructure.Architecture Diagram
Core Components
Application Layer
Frontend
- Technology: React + Nginx
- Deployment: 2-8 pods (HPA)
- Port: 80
- Image:
835960996869.dkr.ecr.us-east-1.amazonaws.com/govtech-frontend
Backend API
- Technology: Node.js 20 + Express
- Deployment: 2-10 pods (HPA)
- Port: 3000
- Image:
835960996869.dkr.ecr.us-east-1.amazonaws.com/govtech-backend
Database
- Technology: PostgreSQL 15
- Development: StatefulSet in EKS
- Production: RDS Multi-AZ
- Port: 5432
Storage
- Service: AWS S3
- Features: Versioning, lifecycle rules
- Access: IRSA (IAM Roles for Service Accounts)
Infrastructure Components
| Component | Type | Purpose |
|---|---|---|
| VPC | AWS Networking | Isolated network (10.0.0.0/16 dev, 10.1.0.0/16 staging, 10.2.0.0/16 prod) |
| EKS | Kubernetes | Container orchestration (govtech-dev/staging/prod) |
| RDS | Managed PostgreSQL | Relational database with Multi-AZ in production |
| ECR | Container Registry | Docker images with automatic vulnerability scanning |
| ALB | Load Balancer | HTTPS routing with WAF protection |
| NAT Gateway | Network | Private subnet internet access (one per AZ) |
Deployment Environments
- Development
- Staging
- Production
- Cluster: govtech-dev
- VPC CIDR: 10.0.0.0/16
- Nodes: 2-4 x t3.small
- RDS: db.t3.micro (Single-AZ)
- AZs: us-east-1a, us-east-1b
- Cost: ~$180/month
Key Design Principles
Zero-Trust Networking
Zero-Trust Networking
All pod-to-pod communication is explicitly defined using Kubernetes NetworkPolicies:
- Frontend can only communicate with Backend
- Backend can only communicate with Database and AWS services
- Database accepts connections only from Backend
- Default deny all traffic, then allow specific flows
Least Privilege Access
Least Privilege Access
Each component has minimal required permissions:
- IRSA (IAM Roles for Service Accounts) instead of hardcoded credentials
- Service accounts:
govtech-frontend,govtech-backend,govtech-database - Backend can access S3 and Secrets Manager, frontend cannot
- Database has no outbound AWS permissions
Encryption Everywhere
Encryption Everywhere
All data encrypted in transit and at rest:
- In Transit: TLS 1.2+ (ALB, RDS, internal K8s)
- At Rest: AES-256 (RDS, S3, EBS volumes, etcd)
- Keys: AWS KMS with automatic rotation
- Secrets: AWS Secrets Manager (not K8s secrets in production)
Infrastructure as Code
Infrastructure as Code
Everything defined in version control:
- Terraform: VPC, EKS, RDS, security services
- Kubernetes YAML: Deployments, services, network policies
- State: S3 backend with versioning and encryption
- Reproducible: Entire environment in 30 minutes
Resource Configuration Examples
Backend Deployment Spec
kubernetes/backend/deployment.yaml
Horizontal Pod Autoscaler
kubernetes/backend/hpa.yaml
Terraform State Management
All Terraform state buckets have:
- Versioning enabled (recover previous states)
- KMS encryption
- Public access blocked
- 90-day retention for deleted objects
Next Steps
Multi-Cloud Design
Learn about portability and cloud provider abstraction
Security Layers
Deep dive into defense-in-depth security model
Network Topology
VPC, subnets, and routing configuration
Scalability
Scaling from 1M to 100M+ users