ECS Fargate + Aurora Multi-Region Resilience
A containerised service on ECS Fargate in two AWS regions, backed by Aurora PostgreSQL (Serverless v2) in an Aurora Global Database. The primary region serves traffic; the standby region runs the network, load balancer and a read-only secondary cluster with zero tasks (pilot light), and Route 53 can fail traffic over on a health check. Deployments use the ECS circuit breaker for automatic rollback, and services scale on CPU. Three scripts cover the operations that usually live only in a runbook: an RDS Blue/Green Deployment of the whole global database for engine upgrades, a point-in-time restore into a throwaway cluster that is checked from inside the VPC and timed, and a planned switchover or unplanned failover to the second region. Terraform deliberately ignores the attributes those operations change, so code and operations do not fight. CI runs terraform fmt and validate, a Trivy IaC scan, shellcheck and an image smoke test.
Highlights
- ▸Aurora Global Database across two regions with pilot-light ECS standby
- ▸Blue/green engine upgrades, timed point-in-time restore tests, failover drills
- ▸Circuit-breaker rollback, forced TLS, KMS, least-privilege IAM, Trivy-clean IaC