How Docterz moved to a serverless AWS architecture to scale accessible healthcare
Docterz, a healthcare platform built by doctors for doctors, aims to make standard, affordable medical care more accessible by reducing financial barriers to healthcare across India. As the platform grew, its existing server-based infrastructure was becoming harder to scale and more expensive to operate. Code deployments were also manual, and the AWS environment had opportunities for better resource utilization. Flentas migrated Docterz's frontend and backend from its existing EC2-based setup to serverless and managed AWS services. The migration also introduced automated deployments, dynamic scaling, and ongoing cost optimization, while maintaining high availability and minimizing disruption.
A server-based setup that couldn't scale efficiently with demand
Docterz needed infrastructure that could respond to changing demand without adding unnecessary operational and infrastructure costs.
Scalability and performance gaps
The existing setup needed to support on-demand scaling while addressing performance limitations.
Manual operations
Code deployments were not automated, and infrastructure operations required more manual effort than necessary.
Cost inefficiency
Existing AWS resources were not fully optimized, leaving opportunities to reduce infrastructure costs without compromising performance.
A serverless migration with automated deployment and cost controls
Flentas moved Docterz's frontend and backend to managed AWS services and introduced automation across deployment, scaling, and resource management.
- 01
The frontend was migrated from Nginx on Amazon EC2 to Amazon S3 static website hosting, while the backend moved from EC2 to Amazon ECS Fargate using Docker images. Amazon CloudFront was introduced for caching and lower-latency content delivery.
- 02
To reduce manual deployment effort, Flentas built a CI/CD pipeline using GitHub webhooks, AWS CodeBuild, and AWS CodeDeploy for production deployments, with Jenkins supporting non-production environments.
- 03
The infrastructure was also configured to respond to workload changes automatically. ECS clusters could scale based on resource utilization, while AWS EventBridge-triggered Lambda functions scaled down non-production environments outside working hours.
- 04
Cost optimization was based on actual usage. AWS resources were rightsized using 30-day CPU and memory utilization data. The solution combined Fargate and Fargate Spot, Reserved Instances for Amazon RDS, and Compute Savings Plans across EC2 and ECS.
Higher availability, faster deployments, and lower infrastructure costs
The migration gave Docterz a more flexible AWS environment while reducing the operational effort involved in running and deploying the platform.
Minimal disruption
The migration was carried out with minimal interruption to the healthcare platform.
Faster deployments
The CI/CD pipeline enabled production releases without service interruptions.
High availability
CloudFront, S3 hosting, and dynamic ECS scaling provided a more resilient application environment.
Scalability
The new architecture could scale resources based on demand, supporting traffic spikes that the previous infrastructure could not handle as efficiently.
Cost optimization
Serverless services, resource rightsizing, Fargate Spot, Reserved Instances, and Savings Plans helped reduce unnecessary infrastructure spend.
24/7 support
Level 1 production monitoring and incident support provided ongoing operational coverage for the development team.
Built on the AWS stack
Where this fits
Cloud Native Development
Explore Cloud Native DevelopmentMigration Factory
Explore Migration FactoryReady to move to a serverless architecture built for uptime and cost control?
Talk to an AWS-certified architect about your own migration.

