Skip to content
All projects

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
Super Admin → OpenVPN → private subnets (no public admin endpoint)

Delivery pipeline

  1. git push
  2. GitHub Actions
  3. OIDC → IAM role
  4. Docker build
  5. Push image
  6. 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.

Get in touch