Skip to content

Rekognition (face liveness) with javascript and AWS amplify

0

I understand I must use AWS Amplify for the Face Liveness service because it processes the video feed from the client and sends back a response object. However to use AWS Amplify do I need to deploy my entire app to Amplify? I don't intend to and I want my identity service alone (needs Rekognition functions) to use Amplify. Is this possible because by the looks of Amplify's UI I need to deploy my project to Amplify. Am I missing something or is what I'm seeing true?

1 Answer
1

You don't need to deploy your entire project to AWS Amplify to use the Face Liveness feature with Amazon Rekognition. While AWS Amplify provides a convenient way to integrate Face Liveness detection into your application, you can use the Amplify SDK and its FaceLivenessDetector component without fully deploying your project on Amplify.

To use Face Liveness with Rekognition in your JavaScript application, you'll need to:

  1. Set up the AWS Amplify SDK in your project. This involves installing the necessary Amplify libraries and configuring them with your AWS credentials.

  2. Use the FaceLivenessDetector component from the Amplify UI library in your application. This component handles the user interface for the liveness check, including displaying instructions, showing the oval for face alignment, and managing the colored light sequence.

  3. Implement the backend logic to interact with Amazon Rekognition's Face Liveness APIs. This includes:

    • Calling CreateFaceLivenessSession to start a session
    • Using StartFaceLivenessSession (handled by the FaceLivenessDetector component)
    • Calling GetFaceLivenessSessionResults to retrieve the results

You can implement this backend logic using AWS SDK for JavaScript or any server-side technology of your choice that can make API calls to AWS services.

The key point is that you're using Amplify's UI components and SDK for the client-side integration, but you're not required to use Amplify for hosting or deploying your entire application. You can host your application wherever you prefer while still leveraging Amplify's components for the Face Liveness feature.

Remember to ensure that your backend has the necessary IAM permissions to call the required Rekognition APIs (CreateFaceLivenessSession and GetFaceLivenessSessionResults).
Sources
Programming the Amazon Rekognition Face Liveness APIs - Amazon Rekognition
Prerequisites - Amazon Rekognition
Architecture and Sequence Diagrams - Amazon Rekognition

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.