← Back to projects
Case Study · Cloud Migration
Migrating a SaaS Platform from Docker Compose to ECS Fargate
Re-architecting a two-instance Docker Compose monolith into an 8-microservice architecture on ECS Fargate.
Architecture diagram placeholder — add a diagram image here when available.
The problem
The platform was running its entire backend on two EC2 instances using Docker Compose. This meant no service isolation, manual deploys, no autoscaling per service, and a single point of failure for the whole platform. As the product grew, this setup couldn't support independent scaling of different services or safe rollouts without risking the whole stack.
What I did
- Re-architected the monolithic Compose setup into an 8-microservice architecture running on ECS Fargate, giving each service its own task definition, scaling policy, and deployment lifecycle.
-
Migrated environment configuration out of
.envfiles and into AWS Secrets Manager, using structured JSON so services could pull scoped secrets at runtime instead of baking them into images or Compose files. - Integrated ElastiCache Redis with TLS enforced in transit, replacing a self-hosted Redis container that had no encryption and was a shared dependency across services.
- Debugged and resolved CORS failures and S3 presigned URL issues that surfaced once services were split apart and started hitting each other across network boundaries instead of talking over localhost.
- Set up self-hosted analytics tooling on EC2, including migrating its datastore to RDS for durability instead of running it as a throwaway container.
- Built an NLB-based ingress path for RTMP traffic to support a live webinar/streaming service, since ALB doesn't support the RTMP protocol and this needed a different load balancing layer than the rest of the HTTP services.
- Configured transactional email (SES) identity verification and SMTP credentials, moving off an old EC2-hosted mail setup.
Result
- Went from 2 monolithic EC2 instances to 8 independently deployable services on Fargate.
- Secrets are no longer stored in plaintext env files anywhere in the stack.
Questions about the setup? Get in touch.