DeepLens and Lambda with AWS Rekognition

Warning

This workshop uses AWS Rekognition. If you do you know want to have your images used in the service, please opt-out of this step and do not get in view of the DeepLens. Let your workshop owner know if you want to use an alternative approach.

Important

From the AWS Rekogntion FAQ's - Q: Who has access to my content that is processed and stored by Amazon Rekognition? Only authorized employees will have access to your content that is processed by Amazon Rekognition. Your trust, privacy, and the security of your content are our highest priority and we implement appropriate and sophisticated technical and physical controls, including encryption at rest and in transit, designed to prevent unauthorized access to, or disclosure of, your content and ensure that our use complies with our commitments to you. Please see https://aws.amazon.com/compliance/data-privacy-faq/ for more information.

Overview

Screenshot

For this workshop, one camera is used for all guests and all applications. This is done by the DeepLens sending all found faces to a central S3 bucket. From there, and event is configured to a SNS topic. That topic can have multiple subscribers from multiple accounts. This means that if Albert Einstein's image is recognized, he will be checked in to all running applications.

A lambda function is used to compare the face sent over from the DeepLens, with the Collection index created in a prior section. The frontend database is then updated if a registered guest is recognized. The UI will update the guest as checked in.

CloudFormation (Required)

Step1: CloudFormation Quick Start

Click on the Launch Stack button in your desired region below. US West (Oregon) is the recommended region for this workshop if at re:Invent.

Important

Ensure that you are consistent with the selected region throughout this workshop. Deployments in multiple regions will lead to multiple AWS services not communicating together.

Region Deploy
US West (Oregon) Deploy in us-west-2
US East (Ohio) - Coming Soon Deploy in us-east-2
US East (N. Virginia) - Coming Soon Deploy in us-east-1
EU (Ireland) - Coming Soon Deploy in eu-west-1

In a new tab you should be redirected to CloudFormations Quick create stack page as shown below.

Screenshot

For Stack name, the default reg-app-s3-rek can be used or customized.

Screenshot

The default for the Parameters section will work as is.

  • Frontend Table Name - Must match the original DynamoDB tables created in previous section.
  • Backend Table Name - Must match the original DynamoDB tables created in previous section.
  • Rek Function Name - Name for the lambda function.

Screenshot

On the next window, scroll to the bottom and under Capabilities check I acknowledge that AWS CloudFormation might create IAM resources. and click Create stack.

Screenshot

Get Recognized (Required)

Step2: DeepLens Face Recognition

Step in front of the camera (if you want to) and watch the React application register you and your guests.

Success

You have now completed checking in your guests! The next step is a bonus section to setup a CloudFront distribution for your website.