Multi-Tenant Infrastructure & Security
Multi-Tenant AWS ECS Platform with OIDC CI/CD
Secure multi-tenant platform for end users, CRM organization admins and Super Admins — private networking end to end, Multi-AZ data, and keyless GitHub Actions deployments.
- Terraform
- AWS ECS
- ALB
- RDS Multi-AZ
- VPC
- Cloudflare
- OpenVPN
- GitHub Actions (OIDC)
- Docker
The problem
One application had to serve three very different audiences — end users, CRM organization admins and Super Admins — while keeping them separated, staying available through failures, and never exposing application services or databases to the public internet.
What I built
- Provisioned the full environment with Terraform: VPC, public and private subnets, ALB, ECS services and RDS.
- Routed traffic Cloudflare (CDN/WAF) → ALB → separate ECS services and target groups for the end-user (LXP/MXP) and organization-admin (CRM) applications.
- Ran every ECS service and the RDS database in private subnets; RDS deployed Multi-AZ for high availability.
- Restricted Super Admin access to the private network through an OpenVPN-based VPN.
- Built GitHub Actions pipelines that build Docker images and deploy to ECS, authenticating to AWS with OIDC instead of stored access keys.
Architecture
Simplified request flow and delivery pipeline.
Edge
- UsersBrowser / app
- CloudflareCDN + WAF
Public subnets
- Application Load BalancerHost/path routing
Private subnets
- ECS serviceEnd-user app (LXP/MXP)
- ECS serviceOrg-admin app (CRM)
Data
- Amazon RDSMulti-AZ
Delivery pipeline
- git push
- GitHub Actions
- OIDC → IAM role
- Docker build
- Push image
- ECS deploy
Outcome
- Application services and databases have no public endpoints.
- The database layer tolerates an Availability Zone failure.
- CI/CD holds no long-lived AWS credentials.
- The whole environment can be recreated from code.
Need something like this built?
Happy to talk through your AWS infrastructure or delivery pipeline.