AWS for Industries

How LiveWell by Zurich leverages serverless architecture to build scalable and cost-effective digital health platforms

Introduction

Zurich is a leading multi-line insurer that serves its customers in global and local markets. With about 55,000 employees, it provides a wide range of property and casualty, and life insurance products and services in more than 215 countries and territories. Zurich’s customers include individuals, small businesses, and mid-sized and large companies, as well as multinational corporations.

LiveWell by Zurich is a digital health and wellbeing platform offered by Zurich Insurance Group.

LiveWell, launched in 2020, is a holistic health app aimed at improving employee wellbeing through technology solutions. Now available also available thru partner brands and directly to consumers, the platform provides tools for assessing physical, emotional, social, and financial health to build healthier habits. Features include health risk assessments, coaching programs, fitness tracking, and access to health professionals.

For employers and insurers like Zurich, LiveWell offers data-driven insights to develop targeted health solutions based on employee needs. Improved workforce health can reduce absenteeism, boost productivity, and yield insurance claim savings. Aggregated data enables customized products and pricing models.

Aligning with Zurich’s strategy to move beyond traditional insurance, LiveWell differentiates by providing technology platforms that improve customer health risk profiles. This supports growth in corporate life and health segments while delivering data-driven health solutions for employers and employees.

A serverless digital health platform

LiveWell decided to adopt a serverless architecture for its platform to improve scalability, reduce costs, and speed up development. By leveraging fully managed services like AWS AppSync, Amazon API Gateway, AWS Lambda, Amazon Aurora, and Amazon DynamoDB, LiveWell can focus on building features instead of managing infrastructure.

AWS AppSync and Amazon API Gateway handle client-side API requests and route them to the appropriate Lambda functions which execute the business logic. Amazon Aurora provides a managed relational database for structured data like customer profiles and activity data, while DynamoDB gives them a fast, flexible NoSQL database for scalable workloads like real-time user activity data and leaderboards. The serverless approach allows LiveWell to scale seamlessly without provisioning servers since these services handle that automatically. This improves availability for customers. LiveWell also benefits from paying only for the actual compute resources used by each Lambda invocation rather than over-provisioning expensive servers. Adopting this serverless architecture reduced LiveWell’s operational costs and enabled faster development, improving customer satisfaction.

According to Martin Jahn, Chief Technology Officer & Member of the Executive Board, LiveWell by Zurich

“We built a serverless architecture from the start to minimize operation and maintenance needs so we could focus on our wellbeing proposition. AWS PaaS components are at the heart of key business services including Data Platform, Activity Platform, etc. AWS supported us in various workshops and training, from architecture design to implementation.

I appreciate the AWS partnership which facilitated better technology decisions, faster implementation and lower cost.”

Architecture Overview

LiveWell has distributed its solutions in multiple platforms:

  • Activity services platform
  • Data Platform
  • Recommendation Platform
  • Reward Platform

For each of this platform, LiveWell uses serverless technology, bringing high availability for their users, scalability to absorb change in traffic patterns and load, as well as cost optimization.

Let’s zoom into the serverless architecture of the Activity services and Data platforms.

Activity service platformFigure 1 Activity service platform

The activity services platform is in charge of collecting data of the customers such as meditation time or number of steps, through multiple devices such as Fitbit, Garmin, Strava, Polar, etc. LiveWell has a platform that can scale efficiently and match their growth ambition.

  1. AWS AppSync exposes GraphQL API to the Flutter web and mobile applications, activity data are uploaded in real-time through WebSocket and user get back real-time updates on their performance.
  2. Activity data from 3rd party app and devices are sent over Amazon API Gateway which takes care of the authentication and authorization for these API calls, and route to the specific AWS Lambda function.
  3. AWS Lambda functions that process the activity data, applying business logic and interact with Amazon Aurora for data storage as well as Amazon Simple Notification Service and AWS Step functions for additional processes to be triggered.
  4. Amazon Simple Notification Service and Amazon Simple Queue Service are used in combination with AWS Lambda to process asynchronously specific business processes following event driven architecture pattern.
  5. AWS Step functions is used to compute advanced business logic for data transformation and leaderboard refresh.
  6. Amazon Aurora stores activity data received from app and devices.
  7. Amazon DynamoDB stores aggregated activity data and leaderboards for the different group of users.

Data platform

The data platform process, transform and analyze the data supporting multiple purposes. A data lake architecture has been used for that, which helps to support both internal data analytics use cases as well as external business intelligence reports and dashboards.

Figure 2 Data platform

  1. Amazon Kinesis is used to stream data from DynamoDB to LiveWell data lake in Amazon Simple Storage Service (S3), external data from CRM, Marketing Technology and CMS is also ingested in S3
  2. Amazon Simple Storage Service (S3) is used to store raw, curated and modelled data
  3. LiveWell use Data Catalog from AWS Glue as a catalog layer for their data lake, and use AWS Glue jobs to perform Extract, Transform and Load (ETL) activities needed to prepare the data
  4. Amazon Athena is used to run query on the data layer from S3. Then those saved queries can be used with LiveWell’s Analytics Dashboard to access the data from published reports

Data Ops using serverless services

In order to manage the storage, transformation and analysis on the data produced, LiveWell team needed a way to scale and automate the creation of Extract Transform and Load (ETL) jobs. For this a Data Ops pipeline has been put in place, managing the development lifecycle of their jobs until production release.

Figure 3 Data Ops using serverless services

Pipeline Flow

When a developer pushes new code to the GitHub repository, it triggers AWS CodePipeline to begin the deployment process via a Webhook.

First, AWS CodePipeline clones the repository and starts the first AWS CodeBuild project. This first project initializes Terraform and applies it to create resources like an S3 bucket with sample data files and an AWS Glue job in the non-production account. It then runs integration tests on the AWS Glue job using pytest. The test consists in running the new AWS Glue job, query the results in Athena, and verify the output matches the expected result. Based on whether the tests pass or fail, this first AWS CodeBuild project succeeds or fails.

Next, the second AWS CodeBuild project assumes a role in the production account, initializes Terraform, and runs a terraform plan to show what resources would be created/updated in production.

This Terraform plan output is presented for a manual approval. An approver reviews the plan and approves the production deployment.

Once approved, the third CodeBuild project uses the assumed production role to deploy the modified Glue job to the production account using Terraform.

The pipeline implements automated testing in a staging environment before requiring human approval for the production deployment. The infrastructure is provisioned using Terraform for consistency across environments.

Conclusion

LiveWell’s use of serverless architecture and managed AWS services allows the company to focus on rapidly developing features that improve customer health outcomes and risk profiles. The platforms can efficiently handle growth while controlling costs. The serverless approach has been crucial for LiveWell to build differentiated digital health solutions on top of Zurich’s insurance expertise.

Adopting a serverless architecture with services like AWS Lambda, Amazon API Gateway, AWS AppSync, Amazon Aurora, and Amazon DynamoDB enables LiveWell to handle unpredictable traffic spikes and scale on demand without provisioning servers. The granular pay-per-use billing of serverless lowers costs by eliminating idle capacity. The fully managed services reduce operational overhead for Zurich’s teams.

By leveraging AWS serverless technologies, LiveWell delivers an enhanced digital experience for customers while acting responsibly and contributing to the sustainability targets of the company. Indeed, the auto-scaling and usage-based billing model perfectly aligns with Zurich’s sustainability commitments as a business. AWS serverless services empower LiveWell to achieve both business value and environmental stewardship simultaneously.

External Links

https://www.zurich.com/
https://livewell.zurich.com/
https://aws.amazon.com/serverless/
https://aws.amazon.com/appsync/
https://aws.amazon.com/api-gateway/
https://aws.amazon.com/lambda/
https://aws.amazon.com/dynamodb/
https://aws.amazon.com/rds/aurora/
https://aws.amazon.com/sns/
https://aws.amazon.com/sqs/
https://aws.amazon.com/step-functions/
https://aws.amazon.com/codebuild/
https://aws.amazon.com/codepipeline/
https://aws.amazon.com/s3/
https://aws.amazon.com/athena/
https://www.terraform.io/

Kevin Bruvry

Kevin Bruvry

Kevin Bruvry is a Senior Solutions Architect with AWS located in Singapore. With a passion for crafting secure, scalable, and highly available cloud solutions, Kevin collaborates closely with major financial institutions to shape their cloud and digital transformation journeys. When he's not immersed in the world of cloud engineering, Kevin enjoys spending quality time with his family.

Raffaele Garofalo

Raffaele Garofalo

Raffaele Garofalo is a Senior Solutions Architect at AWS based in Switzerland and member of the AWS Serverless TFC (Technical Field Community). He helps Financial Institutions to get the benefits from the cloud technologies to scale and transform their business. Raffaele’s background is on Software Development and Architectures.