How a Large-Scale Pharmacy Retailer Migrated Its Prescription and Inventory Platform to AWS Without Disrupting Prescription Dispensing

“Our last audit took three days instead of three weeks. Every question had an answer in the logs, with a merge request and an approver attached to it.”

— Head of Information Security

( 01 )

At a Glance

Operating across nine states, the pharmacy chain supported more than 600 retail outlets, three warehouses and approximately 180,000 prescriptions a day. However, its central prescription and inventory platform still ran on ageing on-premises infrastructure. Over 22 weeks, the platform was migrated to a governed AWS environment, with hybrid connectivity for existing retail outlet and warehouse systems, automated software delivery and stronger security controls.

( 02)

The Challenge

The central platform supported prescriptions across physical retail outlets, the online app and the home delivery network. It checked stock, flagged potential drug interactions, recorded pharmacist sign-off and tracked controlled-substance movements.

Ageing infrastructure presented a growing operational risk. A power incident had taken electronic prescriptions offline for nearly six hours, forcing retail outlets to use paper processes and requiring a week to reconcile records. Launching a new digital service took around six weeks due to server procurement, manual configuration and approval processes. Audit preparation also required weeks of manual evidence collection.

The migration needed to improve reliability without disrupting dispensing, preserve connectivity with on-premises point-of-sale and warehouse systems, and keep patient data within India.

( 03 )

How we Solved it

A governed landing zone, built for healthcare

AWS Control Tower and reusable Terraform modules established separate development, staging and production accounts. A dedicated, locked-down Log Archive account centralised CloudTrail audit logs, configuration records and access logs, protecting evidence from alteration by application teams. Service Control Policies restricted workloads to approved AWS Regions in India and blocked internet routes to database subnets.

Resilient architecture with hybrid connectivity

The central prescription and inventory platform was deployed across three Availability Zones using Amazon ECS with Fargate and Amazon Aurora PostgreSQL with read replicas to support retail outlet and mobile-app lookups. AWS Direct Connect provided private connectivity to warehouses and regional hubs connecting retail outlets to AWS, with site-to-site VPN as backup. Existing retail outlet systems could continue operating locally during connectivity interruptions and synchronise when connections were restored.

Automated delivery with continuous compliance evidence

A GitLab CI/CD pipeline automated builds, testing, security scanning, image publishing and staging, with pharmacist-lead and IT approval before production deployment. Immutable container images, tagged with their commit SHA, moved through each environment. Blue-green releases and automated rollback reduced deployment risk.

SonarQube, dependency and container scanning strengthened release controls, while OpenID Connect-based access avoided long-lived credentials. AWS Config conformance packs and Security Hub provided continuous checks and improved audit traceability.

( 04 )

How We Delivered It

The 22-week engagement followed three phases:

Discovery and proof of concept — 3 weeks: Compliance requirements were mapped, the AWS foundation designed and a drug-interaction service tested on ECS.

Foundation and pilot — 7 weeks: The governed environment, connectivity and delivery pipeline were established, and 40 retail outlets were piloted on AWS.

Production rollout — 12 weeks: Retail outlets were migrated region by region in waves of approximately 50, outside peak dispensing hours. The old and new systems ran in parallel, with automated reconciliation before cutover. A failover exercise, operational runbooks and hypercare supported the transition to the in-house team.

( 05 )

The Impact

The modernised platform gave the pharmacy chain a more resilient foundation for critical prescription and inventory operations. Hybrid connectivity allowed existing retail outlet and warehouse systems to remain in place while the central platform moved to AWS.

Standardised infrastructure and automated delivery reduced the effort involved in launching services and managing releases. Centralised logging and continuous compliance checks made audit evidence easier to trace, while the shared platform supported the introduction of teleconsultation refills and chronic-care subscriptions without building separate infrastructure for each service.

( 06 )

The Results

Measured nine months after the final retail outlet migrated.

Metric
Before
After
Prescription platform up time
~99.5%
99.98%
Recovery from an Availability Zone failure
Nearly 6 hours
~4 minutes
Time to launch a new digital service
~6 weeks
~2 days
Production releases per month
1–2
25+
Audit preparation time
~3 weeks
~3 days
Store lookup response time
2–4 seconds
Under 400 ms
Monthly infrastructure spend
Baseline
41% lower