AWS Cloud Architecture
Cloud-Native ECS Fargate Application
React + FastAPI application with a global CDN frontend, a serverless-container API on ECS Fargate, and MongoDB kept on a private EC2 instance — all Terraform, delivered by CodePipeline.
- ECS Fargate
- S3
- CloudFront
- ALB
- EC2 (MongoDB)
- VPC
- Terraform
- AWS CodePipeline
- Docker
- FastAPI
The problem
A React + FastAPI product needed to run without managing application servers, load fast for users everywhere, and keep its database off the public internet.
What I built
- Hosted the React frontend on S3 behind CloudFront as the public CDN layer.
- Ran the FastAPI backend as containers on ECS Fargate behind an Application Load Balancer.
- Placed MongoDB on an EC2 instance in a private subnet, reachable only by the API.
- Provisioned everything end to end with Terraform and set up AWS CodePipeline for continuous delivery.
Architecture
Simplified request flow and delivery pipeline.
Edge
- CloudFrontCDN
- S3React build
Public subnets
- Application Load Balancer/api routing
Private subnets
- ECS FargateFastAPI containers
Data
- MongoDBEC2, private
Delivery pipeline
- Source
- CodePipeline
- Docker build
- Deploy to ECS Fargate
Outcome
- No application servers to patch for the API tier (Fargate).
- Static frontend served from the CDN edge.
- Database isolated in a private subnet.
- Infrastructure and delivery fully automated.
Need something like this built?
Happy to talk through your AWS infrastructure or delivery pipeline.