Skip to content

Instantly share code, notes, and snippets.

@damiancipolat
Created May 11, 2020 15:04
Show Gist options
  • Save damiancipolat/054ee5fe21bacbb9d622c7e2e7148799 to your computer and use it in GitHub Desktop.
Save damiancipolat/054ee5fe21bacbb9d622c7e2e7148799 to your computer and use it in GitHub Desktop.
Example of use rekognition - detect faces
const AWS = require('aws-sdk');
const rekognition = new AWS.Rekognition();
const s3 = new AWS.S3({apiVersion: "2006-03-01"});
exports.handler = async (event) => {
const params = {
Attributes: ["ALL"],
Image: {
S3Object: {
Bucket: "test-damian-dc",
Name: "damian.jpeg"
}
}
};
const result = await rekognition.detectFaces(params).promise();
console.log('----',JSON.stringify(result));
return true;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment