Create a Precise and Cost-Effective Identity Verification and Intelligent Document Processing Solution for Financial Applications
Automate ID verification and document processing with ML solutions like Amazon Rekognition and Amazon Textract.
- Liveness Detection
- Identity Verification
- Intelligent Document Processing

- User initiates a mortgage application through the front-end application hosted within the AWS Amplify. Amplify is an end-to-end solution that enables front-end web developers to build and deploy secure, scalable full stack applications.
- The application invokes Amazon API Gateway to route the request to the appropriate Amazon Lambda function based on the user activity. For the mortgage use case, we have defined three major activities: liveness detection, identity verification, intelligent document processing. Each of these activities are implemented using one or more Lambda functions.
- Lambda functions invoke the appropriate ML service APIs (Amazon Rekognition, Amazon Rekognition Streaming, Amazon Textract) to fulfill the user-initiated activity.
- Lambda functions interact with Amazon S3 to store the images (Face images, ID card image) and documents provided by the user as part of the mortgage application process. Amazon DynamoDB keeps the URL for face images stored in the S3 bucket, identity verification status, the extracted information from the ID card and mortgage documents.
- CreateFaceLivenessSession API initiates the face liveness session, when a request is received from UI and returns a unique session ID. This session ID is used when streaming Face Liveness video and also used to get results for a Face Liveness session.
- StartFaceLivenessSession API starts a Face Liveness video stream from FaceLivenessDetector UI component for a specific session ID and streams it to the Amazon Rekognition streaming service to begin the Face Liveness Detection process. StartFaceLivenessSession API takes in the challenge ID and session ID along with the selfie video and processes the streamed video in real-time, stores the results. Once this process is completed, the API send signal to FaceLivenessDetector UI Component to end the streaming process.
- GetFaceLivenessSessionResults API is used to get the results for a specific session. This API returns the corresponding Face Liveness confidence score, a reference image that includes a face bounding box, and a maximum of four audit images that also contain face bounding boxes. The reference image is of high resolution and can be used for identity verification. It is recommended to regularly run human reviews on audit images to ensure that the spoof attacks are mitigated.
- User initiates the face liveness check in the UI application deployed in AWS Amplify.
- API Gateway routes the request to the Create Liveness Session Lambda function. The Lambda function invokes the Amazon Rekognition Face Liveness API - CreateFaceLivenessSession to create an unique session ID. With this session ID, UI renders the FaceLivenessDetector Amplify component.
- The FaceLivenessDetector component connects to the Amazon Rekognition streaming service, renders an oval on the user’s screen, and displays a sequence of colored lights. FaceLivenessDetector records and streams video in real-time to the Amazon Rekognition streaming service using the StartFaceLivenessSession API. StartFaceLivenessSession API processes the streamed video in real-time, stores the results and send signals to Amplify Component to end the streaming process.
- UI invokes Get Liveness Results Lambda function through API Gateway, to get the results for the specific session. Lambda function, in turn invokes GetFaceLivenessSessionResults API to retrieve the results for the specific session ID. API returns the corresponding Face Liveness confidence score, a reference image that includes a face bounding box, and audit images that also contain face bounding boxes. Based on the confidence score, the Lambda function takes the success or failure flow and returns an appropriate message to the UI.
- Reference image and Audit images are stored in Amazon S3 and the Face Liveness results are stored in Amazon DynamoDB.
Analyze Lending API receives a loan document and then splits it into pages, classifying them according to the type of document. The document pages are then automatically routed to Amazon Textract text processing operations for accurate data extraction and analysis. Refer to the link to see the list of documents that Analyze Lending can support.
- Amazon Textract StartLendingAnalysis API
- Amazon Textract GetLendingAnalysis API
- User uploads multi-page lending documents containing different categories of documents.
- API Gateway routes the request to one of the Lambda functions – Start Lending Analysis Lambda function. The Lambda function stores the uploaded document in the S3 bucket and invokes the Amazon Textract StratLendingAnalysis API to initiate the classification and analysis of an input document. Input for this API includes the lending document S3 URL and AWS Simple Notification Service (SNS) Topic as NotificationChannel. StartLendingAnalysis API returns a job identifier (JobID) that is used to get the results. JobID can be stored in Amazon DynamoDB for easy retrieval in next steps.
- StartLendingAnalysis is an asynchronous service. When the text analysis is completed, Amazon Textract publishes a completion status to the Amazon SNS topic that you specify in NotificationChannel, which in turn sends the message to the AWS Simple Queue Service (SQS) Queue subscribed to the SNS topic.
- Get Lending Analysis Results Lambda function gets the completion status from the Amazon SQS queue for the specific JobID returned from StartLendingAnalysis API. If the status value in the message is SUCCEEDED, the Lambda function invokes GetLendingAnalysis API with the JobID to get Analyse Lending response objectin JSON Format.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.