From Monolith to Microservices: A Real-World AWS Migration Case Study

Table of Contents
Introduction
Large enterprises frequently grapple with monolithic applications that struggle to scale, update, and maintain. In 2019, Telia Denmark—part of the global telecom leader—partnered with Tech Mahindra to re-architect their on-premises Customer Information Management (CIM) platform into a containerized microservices framework using AWS. This migration addressed performance bottlenecks, reduced downtime, and enabled independent service deployments.
Why Microservices?
Adopting microservices offers several key advantages over monolithic architectures:
- Scalability & Elasticity
Scale individual services based on demand instead of the entire application. - Fault Isolation
A failure in one microservice has minimal blast radius compared to monolith failures. - Independent Deployments
Teams can build, test, and deploy services autonomously, reducing release risks. - Cost Optimization
Pay-per-use compute models like AWS Fargate eliminate idle resource costs. - Technology Heterogeneity
Choose the right language or runtime per service without impacting the whole system.
Real-World Case Study: Telia Denmark
Background
Telia’s CIM platform ran on-premises in Sweden, relying on a large, tightly-coupled codebase with significant reliability and maintenance challenges. Every update risked system-wide downtime, and licensing costs for legacy databases and middleware were high.
Challenges
- Large monolithic application with performance and reliability issues
- High blast radius: single-component failures caused full-system outages
- Manual deployment processes leading to extended downtime
- Expensive, third-party licensed on-premises Oracle databases
- Complex dependency management and slow release cycles
AWS Services Utilized
The migration leveraged a suite of AWS managed services for compute, storage, networking, and orchestration:
- AWS Fargate & Amazon ECS
Serverless containers to run and scale microservices without managing servers. - Amazon Aurora (MySQL/PostgreSQL)
Cloud-native relational database replacing on-premises Oracle. - AWS Database Migration Service (DMS)
Automated heterogeneous data migration and continuous replication during cutover. - Amazon Route 53 & Application Load Balancer
Global DNS routing and layer-7 load balancing for HTTP/HTTPS traffic. - Amazon VPC, VPN & AWS IAM
Secure networking and identity controls for multi-AZ deployments. - Amazon CloudWatch & AWS CloudTrail
Monitoring, logging, and audit trails for operational visibility and compliance. - Jenkins & JFrog Artifactory on EC2
CI/CD tooling hosted in Docker containers for automated build and deployment pipelines.
Architecture Overview
Post-migration, Telia’s CIM application decomposed into microservices:
- CIM Service – Core customer data CRUD operations
- Bridge Service – Connects legacy on-premises systems to new Aurora DB
- Search Service – Indexes customer data for low-latency queries
- Identification Service – Integrates third-party identity verification
- Subscription Service – Manages customer subscription data
- Device Service – Tracks customer device details
Containers were deployed via ECS on Fargate, with ECR as the private image registry. Client requests hit Route 53, routed through an ALB to the appropriate Fargate tasks. Auto Scaling rules maintained service health by scaling out at over 90% memory utilization and scaling in below 50%.
Database Migration
Telia migrated over 70 million Oracle records to Amazon Aurora PostgreSQL within 90 minutes using AWS DMS and custom PL/SQL scripts for schema adaptation and incremental data loads. Challenges included heterogeneous engine differences, case-sensitivity, and ensuring zero data loss during cutover.
Sample AWS DMS CLI Command
aws dms create-replication-task \
--replication-task-identifier telia-cim-migration \
--source-endpoint-arn arn:aws:dms:us-east-1:123456789012:endpoint:source-oracle \
--target-endpoint-arn arn:aws:dms:us-east-1:123456789012:endpoint:target-aurora \
--migration-type full-load-and-cdc \
--table-mappings file://table-mappings.json \
--replication-task-settings file://task-settings.json
Adjust ARNs, region, and file paths accordingly.
CI/CD Pipeline
To achieve zero-downtime deployments, Telia implemented a container-driven CI/CD pipeline:
- Jenkins on EC2 builds and tests microservice artifacts using Maven.
- Artifacts are stored in JFrog Artifactory and Docker images pushed to Amazon ECR.
- Upon successful build, Jenkins triggers Amazon ECS deployments, updating Fargate tasks behind the ALB.
- New containers are warmed up before draining old tasks to ensure seamless cutover.
Security & Compliance
Security was ingrained at every layer:
- VPC & Site-to-Site VPN: Secure tunnel between on-premises data center and AWS VPC using IPsec/TLS.
- Network ACLs & Security Groups: Enforce least-privilege access at subnet and instance levels.
- Multi-AZ Deployments: High availability across multiple Availability Zones.
- AWS IAM: Role-based access control for services and CI/CD tooling.
- CloudTrail & Config: Comprehensive audit trails and resource configuration monitoring for governance.
Benefits & Outcomes
- Improved Availability & Reliability Leveraged ALB, Auto Scaling, and Fargate to achieve sub-five-minute recovery from failures.
- Cost Reduction Up to 30% lower operational costs by eliminating idle server capacity and Oracle licensing fees.
- Faster Release Cycles Deployment lead time dropped from days to hours via automated CI/CD.
- Scalable Growth On-demand scaling supports traffic spikes during marketing campaigns without manual intervention.
- Data Migration Velocity 70 million records migrated in 90 minutes with zero data loss.
Conclusion
Telia Denmark’s migration from a monolithic on-premises CIM platform to an AWS-based microservices architecture exemplifies how enterprises can modernize legacy systems for agility, resilience, and cost efficiency. By leveraging AWS managed services and best practices, organizations can achieve seamless migrations, robust security, and continuous innovation.
Resources
- Migrating Applications from Monolithic to Microservice on AWS: AWS APN Blog
- Simplify Refactoring Monoliths to Microservices with AWS & vFunction: AWS APN Blog
- AWS DMS Documentation: AWS DMS User Guide
- Amazon Aurora: AWS Aurora
- AWS Fargate: AWS Fargate