AWS Public Sector Blog

Building a serverless MRI pipeline for precision medicine on AWS

AWS branded background with text "Building a serverless MRI pipeline for precision medicine on AWS"

The Australian Epilepsy Project (AEP) is transforming epilepsy diagnosis and care across Australia. The AEP team faced a daunting challenge: processing and analyzing 20-hour magnetic resonance imaging (MRI) workflows for participants and clinicians scattered across the country. Their solution—a serverless, container-orchestrated neuroimaging pipeline on Amazon Web Services (AWS)—has accelerated the delivery of life-changing results to clinicians and patients while reducing costs by over 35%.

Bringing precision medicine to epilepsy care nationwide

The AEP is a $30 million national Precision Medicine Initiative that combines neuropsychology, advanced MRI, and genetics testing to improve epilepsy diagnosis and treatment. With over 250,000 Australians living with epilepsy and the condition costing the economy $6.9 billion annually, the project addresses critical gaps in diagnosis accuracy and treatment access, particularly for regional and remote patients.

Each AEP participant undergoes a comprehensive 1.5-hour MRI scan using research-grade neuroimaging protocols specifically tailored for epilepsy. The resulting datasets require complex processing workflows that previously took 25 hours of computation per participant—a scale that demanded a robust, scalable cloud infrastructure capable of handling Digital Imaging and Communications in Medicine (DICOM) data from multiple clinical sites across Australia.

Managing medical imaging data at national scale

Initially, the AEP team committed to an existing neuroimaging processing platform, but it quickly became clear that the solution couldn’t meet their performance, flexibility, and integration requirements. The team needed a system that could:

  • Reliably ingest and store large DICOM datasets from multiple clinical sites across Australia
  • Process long-running, research-grade MRI pipelines that maintain traceability and reproducibility
  • Ensure data security while sending results directly to clinicians
  • Enable direct scanner site-to-cloud connectivity for seamless data ingestion
  • Optimize for manageability and operational streamlining rather than low-latency execution
  • Reduce operational costs while scaling nationally, a crucial factor for the AEP

“Because individual processing speed is not a critical factor for our study, we optimized for manageability, reliability, and operational simplicity,” explained Akshat Arora, senior software engineer at the AEP. “Our processing turnaround time is measured in days rather than minutes, so architectural choices could be guided by scalability and maintainability.”

Building a serverless architecture on AWS

Working with AWS, the AEP team designed a serverless, container-orchestrated architecture that performs four major functions: receiving neuroimaging data from MRI scanning sites, storing raw data more securely, performing complex postprocessing steps on the raw MRI data, and distributing these results to clinical and research environments.

The solution uses multiple AWS services, each selected to satisfy specific operational needs.

Medical imaging foundation with AWS HealthImaging

AWS HealthImaging provides DICOM-based storage and retrieval capabilities for medical imaging data management. The service replaced the AEP’s previous Orthanc-based DICOM store and now serves as the data storage layer for the MRI viewer capability within the AEP portal, delivering DICOM images to both researchers and clinicians. This HIPAA-eligible service provides the scalable infrastructure needed to support the team’s data management requirements as they pursue their pathway to commercialization and Therapeutic Goods Administration (TGA) approval.

Scalable, isolated compute for long-running workflows

Amazon Elastic Container Service (ECS) on AWS Fargate runs MRI processing containers in isolated, serverless compute environments. These containers retrieve DICOM data directly from AWS HealthImaging, process the imaging studies through complex neuroimaging pipelines, and store results back to Amazon Simple Storage Service (Amazon S3). This removes the need to manage Amazon Elastic Compute Cloud (Amazon EC2) instances or auto scaling groups while supporting the team’s CPU-intensive workflows. Amazon Elastic Container Registry (ECR) stores container images, facilitating version control and seamless updates across the pipeline.

Workflow orchestration and state management

AWS Step Functions acts as the orchestration layer, managing state transitions from DICOM ingestion in AWS HealthImaging through to quality control, processing, postprocessing, and export. The service provides retry logic, timeouts, and visual execution tracing while coordinating data retrieval from S3 and launching appropriate processing containers across the full lifecycle of each imaging study.

Durable, cost-effective storage

Amazon S3 is the primary data store for all data across the platform, including the DICOM imaging data used by the imaging pipeline, as well as intermediate results and derived outputs, with lifecycle management applied throughout. Ephemeral storage attached to Fargate tasks replaced the previous dependency on shared file systems, meaning streamlined, stateless compute.

Persistent metadata and execution tracking

Amazon Relational Database Service (RDS) for PostgreSQL stores pipeline execution metadata, logs, and audit trails to provide thorough tracking of each study’s journey from ingestion to final output. This means the team’s neuroimaging portal can query task states reliably and facilitate traceability across the full dataset lifecycle.

Event-driven postprocessing

AWS Lambda handles lightweight postprocessing tasks such as packaging outputs, generating quality control summaries, and initiating export workflows. Lambda functions react to Step Functions events without the overhead of containerized environments.

Secure data export

AWS Systems Manager facilitates secure, controlled export of processed data to research environments, removing the need for inbound ports or permanent network links, and means exports are logged and auditable.

Private, cost-efficient access

AWS PrivateLink for Amazon S3 and Amazon ECR keeps large-volume data transfers private and cost-efficient, reducing latency and removing Network Address Translation (NAT) Gateway egress costs across hundreds of processing tasks.

The diagram below illustrates the serverless architecture, showing how DICOM data flows from clinical sites through AWS HealthImaging, processing containers on AWS Fargate, and distribution to clinical and research environments.

Figure 1: AEP neuroimaging portal architecture.

Streamlining operations with integrated portal management

To manage the workflow, the AEP team developed a custom neuroimaging portal embedded within their existing AEP clinician portal. This web-based interface integrates directly with AWS HealthImaging and other AWS services to provide staff with sophisticated study management capabilities.

Staff can view DICOM studies stored in AWS HealthImaging, perform initial quality control checks, launch versioned MRI processing pipelines with full visibility into the pipeline status, and inspect analysis outputs before distribution using the portal. The integration across AWS services means study metadata and processing history remain synchronized and auditable.

After datasets pass final review, the portal orchestrates result distribution to appropriate destinations: clinically relevant results synchronize to the clinical portal for treating clinicians, while research-derived outputs export to on-premises research servers for advanced analysis.

The image below is a screenshot of the portal interface that shows the quality control workflow where staff can review DICOM studies, monitor processing status, and approve results for distribution to clinicians and researchers.

Figure 2: AEP portal neuroimaging quality control tab.

Delivering measurable impact through AWS integration

Since deploying the AWS system in March 2025, the AEP offering has delivered significant operational and clinical benefits.

Dramatic processing acceleration

Through parallelization and event-driven architecture design enabled by the integrated AWS services, the AEP reduced MRI processing time from 25 hours to 20 hours per participant; a significant improvement meaning results can reach clinicians faster. This acceleration directly impacts patient care by reducing the time from scan completion to diagnosis.

Substantial cost reduction

Using a cost-effective storage layer alongside serverless compute and managed services, the AWS solution reduced compute costs by over 35% compared to the previous service. Research assistants who previously spent significant time manually managing DICOM data and coordinating processing now have streamlined, automated workflows.

Simplified infrastructure management

The combination of AWS HealthImaging for DICOM management, AWS Fargate for serverless compute, and managed services for orchestration removed the complexity of maintaining traditional infrastructure. This managed approach provides automatic scaling, backup, and compliance capabilities so the team can focus on processing workflows rather than infrastructure maintenance.

Exceptional reliability and scalability

The service has run with exceptional reliability since deployment, requiring minimal intervention so the development team can focus on future enhancements. The integrated AWS services provide the robust foundation needed to handle imaging data from over 1,500 patients across seven scanning sites in five Australian states.

Scaling precision medicine beyond epilepsy

The AEP team is now preparing substantial upgrades that will use the full capabilities of their AWS architecture for large-scale retrospective analysis across their cohort. Integrated with the broader AWS environment, the automated DICOM connector equips MRI facilities with a way to transmit data directly to the cloud.

“Building our end-to-end MRI processing platform has reinforced an important lesson: No matter how carefully a system is planned, real-world requirements will always evolve,” reflected Aaron Capon, lead imaging software engineer at the AEP. “By choosing a flexible and feature-rich foundation like AWS, which offers powerful compute, orchestration, and storage services, we were able to adapt quickly, refine our workflows, and ultimately deliver a platform that meets the diverse needs of our national, multimodal research study.”

The success of the AEP’s AWS environment demonstrates how combining purpose-built medical imaging services with sophisticated cloud infrastructure can accelerate Precision Medicine Initiatives, breaking down geographic barriers while maintaining the security, reliability, and cost-effectiveness essential for healthcare research at scale.

Learn more about how AWS can help your healthcare organization build scalable, more secure solutions for medical imaging and research.

Related stories

Aaron Capon, PhD

Aaron Capon, PhD

Aaron is the lead imaging software engineer for AEP at The Florey Institute of Neuroscience and Mental Health. He specializes in the design and operation of secure, scalable imaging platforms, including the transfer, processing, and management of large MRI datasets. His work focuses on productionizing research analysis code and integrating image-processing pipelines into the AWS ecosystem to support reliable, end-to-end workflows.

Akshat Arora

Akshat Arora

Akshat is a senior software engineer for AEP at The Florey Institute of Neuroscience and Mental Health. His work focuses on solution architecture, designing secure, scalable, and cost-effective cloud platforms for data-intensive workloads. He is passionate about simplifying complex systems and building strong architectural foundations.

Juan Mejia

Juan Mejia

Juan is a senior solutions architect at Amazon Web Services specializing in healthcare solutions across Victoria, Australia. Based in Melbourne, Juan leads the healthcare technical strategy for the public sector in Victoria and has served as the lead AWS solutions architect for transformative projects such as the Australian Epilepsy Project over the past 5 years. With over 6 years of experience as an AI and machine learning specialist at AWS, Juan is passionate about the intersection of healthcare and artificial intelligence, helping healthcare organizations use cloud technologies to improve patient outcomes and accelerate medical research.