Case Study
Modernizing Frontend Delivery: Migrating from ECS to AWS Amplify
Migrated a React frontend from ECS to AWS Amplify, replacing persistent compute with edge-cached static hosting for lower latency, simplified operations, and reduced costs.
Challenge
TargetBay’s BayRewards frontend is a React application that powers customer engagement features including coupons, progress tracking, and real-time leaderboards. Initially deployed on EC2 and later migrated to ECS, the application serves tens of thousands of global users. Despite the ECS migration, several operational and performance issues persisted:
- Regional Latency: Users outside the primary AWS region — particularly in APAC — experienced consistently slow load times, degrading the engagement experience that BayRewards is designed to deliver.
- Fragile Availability Model: A single ECS cluster served as the sole point of failure. Any cluster-level issue risked taking the entire frontend offline.
- High Operational Complexity: Managing Docker registries, task definitions, ECS service updates, and container health monitoring for a static React frontend added significant operational overhead disproportionate to the workload’s requirements.
- Persistent Compute Costs: The ECS deployment maintained fixed baseline compute costs around the clock, even during low-traffic periods when the application served minimal requests.
Solution
FactualMinds migrated BayRewards from ECS to AWS Amplify, replacing container-based hosting with a fully managed, edge-distributed static hosting platform purpose-built for frontend applications.
CI/CD and Deployment:
- Connected TargetBay’s GitHub monorepo to AWS Amplify Console
- Configured build settings (
npm ci && npm run build) for consistent, reproducible builds - Automated deployments triggered on push to
main(production) anddevelop(staging) branches - Enabled branch-based preview deployments for QA and design teams to review changes before merge
Hosting and Distribution:
- Amplify stores deployment artifacts in Amazon S3 with automatic versioning
- Amazon CloudFront (provisioned by Amplify) delivers the application from edge locations worldwide, eliminating regional latency
- SPA routing, redirects, and rewrites are handled natively by Amplify without custom server configuration
DNS and Security:
- Amazon Route 53 configured for DNS routing to
bayrewards.io - AWS Certificate Manager (ACM) TLS certificates provisioned and renewed automatically
- Optional AWS WAF integration available for additional request filtering
AWS Services Used
- AWS Amplify Console — Managed CI/CD, hosting, and preview deployments
- Amazon S3 (via Amplify) — Artifact storage with automatic versioning
- Amazon CloudFront — Global edge-cached content delivery
- AWS Certificate Manager — Automated TLS certificate provisioning and renewal
- Amazon Route 53 — DNS management and routing
- AWS WAF (optional) — Web application firewall for request filtering
Results
The migration from ECS to Amplify delivered improvements across performance, reliability, operations, and cost:
- Global edge delivery with CloudFront serving the application from edge locations worldwide, significantly reducing latency for APAC and other previously underserved regions
- Zero single points of failure as Amplify’s managed infrastructure eliminates cluster-level availability risks
- Simplified operations with no Docker images, task definitions, or ECS service configurations to manage — the entire deployment lifecycle is handled through Git push
- Reduced compute costs by eliminating persistent EC2/ECS compute in favor of pay-per-use static hosting with no baseline costs during low-traffic periods
- Automated CI/CD with branch previews enabling QA and design teams to review frontend changes in isolated environments before production deployment
Results
Want Similar Results?
Let our AWS experts help you achieve your business goals.
