Healthcare Tech Powered by AWS Helps Diagnose Sleep Disorders at Home


BresoTec needed a cloud-based application to manage devices, data analyses, reports, physicians, and patients for its new home sleep test product.


ClearScale designed an intuitive web portal for BresoTec customers using several AWS services, including S3, SQS, Lambda functions, ELB, and Auto Scaling.


Bresotec was able to minimize the total cost of ownership of its BresoDx product and deliver exceptional services to customers.

AWS Services

Amazon SQS, Amazon S3, Amazon Virtual Private Cloud (VPC), Amazon RDS, Elastic Load Balancing, AWS Lambda, AWS AutoScaling, AWS CloudFormation, Amazon CloudWatch, AWS CloudTrail


BresoTec Inc., sees sleep differently — sleep is what you make of it. As a sleep management company, BresoTec Inc. brings together state-of-the-art technology and innovation to provide effective solutions to every aspect of sleep. With BresoTec’s world-leading scientists on sleep research and cutting-edge technology, you can dream effectively, day or night.

BresoTec has developed BresoDx® a home-based, simple, and highly accurate home sleep test indicated for the diagnosis and monitoring of obstructive sleep apnea and related breathing disorders, such as snoring. Validated by peer-reviewed scientific papers, BresoTec’s patented SoundTrac™ technology analyzes multiple streams of information and automatically produces results matching traditional in-lab polysomnography studies.

"ClearScale was true to their word and delivered what they promised. We were impressed with their commitment, and believe them to be experts at leveraging Amazon Web Services. Their friendliness, and support through the whole process was invaluable and much appreciated."
William Hancharek
Manager of Process Control and QA. BresoTec

The ClearScale Solution

BresoTec partnered with ClearScale to design and develop a web portal application to manage BresoDx® devices and provide an intuitive interface for Physicians and employees to manage device data and patients. The portal application was designed to track devices during manufacturing, prescribe/provision devices by medical professionals, gather and analyze patient sleep data, display results to physicians for diagnosis, and present report to physicians and patients for review. ClearScale was also tasked with delivering a highly scalable, redundant, and secure infrastructure for running the application.

Cloud Application Development

ClearScale worked closely with BresoTec to formalize requirements for the cloud portal application. We started with a clear understanding of the business processes involved. During the manufacturing process, device information was entered into the portal (manual or batched). Each device was associated with an SD card. Physicians input new patients into the portal and prescribe BresoDx® device. The order was processed and device shipped to the patient. The patients used the device and the raw sleep data collected was uploaded automatically from the SD card to the portal. The raw data was analyzed and results securely stored. Physicians were instantly notified to review the PDF reports and provide diagnosis to their patients based on the gathered sleep data.

To run these processes seamlessly and efficiently the application architecture was defined leveraging several Amazon services: S3 for storing raw and processed data, SQS for queueing messages for data processing, and Lambda functions for running BresoTec's proprietary algorithms for processing sleep data. Front end application frameworks were also defined based on the requirements. Continuous feedback from BresoTec drove the iterative development process. The following section will list the application requirements at a high level including application interface screenshots.

High Level Application Requirements

User Management Flows:

  • Add/Manage Administrative Users
  • Add/Manage Physicians
  • Add/Manage Patients

Device Management Flows:

  • Add/List devices
  • Add/List SD cards
  • Bulk Import: upload unique device identification data

Order Processing Flow:

  • Create new orders (Prescriptions)
  • List pending orders
  • Associate devices to SD cards
  • Update shipping information

Device Data Upload:

  • Raw data upload from SD card to S3

Analysis Application Flow:

  • Uploaded data is copied from S3 for conversion
  • Data converted and analyzed with proprietary algorithm
  • Sends notifications after analysis is complete
  • Changes state of order and card’s availability

Analysis reports:

  • List test results
  • Diagnosis downloads (PDF)

Application development frameworks used:

  • Web tier: Java Spring-framework family
  • Security: Apache Shiro framework
  • HTML rendering: #Freemarker templates engine
  • DB: ORM Hibernate (+JPA notation), MySQL DB, Spring-Data
  • PDF generation and split: JLR (java latex report) + pdflatex (packet “texlive”)
  • PDF view: PDF.js

Logical Diagram:

Bresotec Diagram

Infrastructure Design

BresoTec needed a highly available, redundant, and scalable cloud infrastructure to host the new web portal application. They have a keen focus on their customers and product, so minimizing management overhead was a key consideration. ClearScale designed an infrastructure that leverages best practices for cloud scalability and automation. The infrastructure was deployed in a Virtual Private Cloud (VPC), across multiple Availability Zones (AZs) for availability and redundancy. AWS managed services were used to decrease management overhead: Relational Database Services (RDS), Simple Storage Service (S3), Simple Queue Service (SQS), AWS Lambda, Elastic Load Balancing (ELB), and Auto Scaling. AWS Cloud Formation were hosted and Chef was used for infrastructure automation and configuration management.

Two subnets were provisioned within each AZ: Public subnet for NAT and ELB services, and Private subnet for web/application instances and RDS. The web tier was load balanced between instances in both AZs to provide high availability. The web tier auto-scaling was configured to expand and contract based on resource utilization. The application tier auto-scaling was configured to provide failover capabilities, ensuring that there was a single operational instance running within one of the AZs. The remaining AWS services were fully managed, high availability (HA), and redundant by design.

Bresotec Diagram


To further address the requirement for minimal maintenance activities, ClearScale has deployed a framework based on best practices for cloud automation. Amazon CloudFormation templates were used to deploy network components, AWS services, RDS databases, and web/application server instances. Implementation of infrastructure as code (IAC) strategies promotes the quality, predictability, and reproducibility of all aspects of the cloud solution.

Overview of Cloud Formation templates:

  • VPC and Base Components CF template
    • Create VPC across two AZs
    • Create Public and Private Subnets
    • Setup Security Groups and IAM roles
    • Configure Internet Gateway, routes, EIPs
    • Create S3 buckets
    • Setup SQS service
    • Deploy Bastion hosts based on AMI
    • Deploy NAT instances based on AMI
  • Database CF template
    • Deploys and configures MySQL RDS instances (Master/Slave)
  • Web / Application CF template
    • Create Elastic Load Balancer
    • Setup Launch Configurations for Auto Scaling Groups
    • Create Auto Scaling Groups for web and application tiers
    • Create IAM role for Web and Analysis App's tier's instances
    • Deploy web / application instances and configure chef client

Overview of Chef automation cookbooks:

  • Web Service
    • Install and configure Tomcat
    • Install and configure Java web application
    • Setup encryption keys
  • Analysis Service
    • Install and configure Java web application
    • Configure connectivity to SQS service
    • Setup encryption keys

Cloud Security and Compliance

Several strategies have been implemented to enhance cloud security and address compliance requirements. Core services were placed in private subnets that cannot be accessed directly from the internet to limit exposure. To protect Personal Health Information (PHI data), storage and database encryption were enabled. Amazon CloudWatch logs and AWS CloudTrail services were configured to provide an audit trail of all activities performed in the environment. Chef configuration management was deployed to ensure consistency of web and application instances. The entire environment was managed under infrastructure as code practices to ensure traceability of changes. IAM roles were implemented to manage access and ensure accountability. Security groups were configured to restrict communications to required ports and services as well as provide instance isolation.

The Benefits

BresoTec has the been able to focus their efforts on product delivery while leveraging ClearScale’s expertise in cloud solutions to build the portal application and supporting infrastructure. BresoDx® was backed by a cloud application infrastructure designed to scale in response to the demands of the business. By strategically leveraging AWS managed services and implementing deployment automation, BresoTec was able to minimize total cost of ownership (TCO) and deliver top tier services to their customers.