What does this AWS Solutions Implementation do?

The AI-Powered Health Data Masking solution helps healthcare organizations identify and mask health data in images or text. This solution uses Amazon Comprehend Medical to detect health data in a body of text, Amazon Rekognition to identify text in an image, Amazon API Gateway and AWS Lambda to provide an API interface for this functionality, and AWS Identity and Access Management (IAM) to authorize API requests.

This solution was designed for implementation as part of a set of mitigating controls in your environment, and does not guarantee alignment to any regulatory framework. It is your responsibility to ensure that the outputs generated by this solution comply with any legal requirements applicable to your organization. For more information, see the solution's implementation guide.

AWS Solutions Implementations overview

AWS offers a solution that uses AWS artificial intelligence (AI) services behind a serverless API to identify and mask health data. The diagram below presents the architecture you can automatically deploy using the solution's implementation guide and accompanying AWS CloudFormation template.

AI-Powered Health Data Masking | Architecture Diagram
 Click to enlarge

AI-Powered Health Data Masking architecture

The AWS CloudFormation template deploys an Amazon API Gateway to invoke the microservices (AWS Lambda functions). The microservices provide the business logic to manage preprocessing configuration and logic, and identifying and masking health data. The microservices interact with Amazon Rekognition to identify text in an uploaded medical image, and the Amazon Comprehend Medical protected health information data extraction and identification (PHId) API to identify health data in text.

Additionally, the template deploys an Amazon Simple Storage Service (Amazon S3) bucket for storing raw and masked images, AWS CloudTrail to log API actions, and AWS CloudWatch Logs to log errors within the AWS Lambda functions. By default, log files are encrypted over HTTPS.

AI-Powered Health Data Masking

Version 1.0
Last updated: 08/2019
Author: AWS

Estimated deployment time: 2 min

Source Code  CloudFormation template 
Did this Solutions Implementation help you?
Provide feedback 


Health data masking

AI-powered entity detection to quickly detect, identify, and mask health data in medical images and text.

API interface

The solution creates API calls to return the location of text and health data in an image or text, and generates a new masked image or replaces the identified health data in text.


The solution uses Amazon CloudWatch to capture Amazon API Gateway actions in your environment and AWS CloudTrail to log information from the AWS Lambda functions and Amazon API Gateway.
Solving with AWS Solutions: AI Powered Health Data Masking
Back to top 
Build icon
Deploy a Solution yourself

Browse our library of AWS Solutions Implementations to get answers to common architectural problems.

Learn more 
Find an APN partner
Find an APN Partner

Find AWS certified consulting and technology partners to help you get started.

Learn more 
Explore icon
Explore Solutions Consulting Offers

Browse our portfolio of Consulting Offers to get AWS-vetted help with solution deployment.

Learn more