Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Internet of Things with Raspberry Pi 3

You're reading from   Internet of Things with Raspberry Pi 3 Leverage the power of Raspberry Pi 3 and JavaScript to build exciting IoT projects

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788627405
Length 248 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Maneesh Rao Maneesh Rao
Author Profile Icon Maneesh Rao
Maneesh Rao
Arrow right icon
View More author details
Toc

The code

Let's write the code to bring the building access management System to life using AWS S3 and Rekognition.

The setup requires Node.js to be installed on Raspberry Pi, which we have already done quite a few times in the previous chapter. So, we'll not repeat that here and straight away start writing the code.

Index face module code

This code will extract the feature information of faces stored in the S3 bucket and store them in the piCollection that we created earlier using the AWS CLI tool.

Create a file with the name indexFaces.js and include the npm modules aws-sdk and fs in it. Make sure these modules are installed or run npm install command in the terminal to do the installation, as shown in Figure 7...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime