This project shows you how to setup an S3 trigger whenever an image is added to an S3 bucket. The trigger will invoke a Lambda function. This Lambda function will call AWS Rekognition, and output the results in the same S3 bucket as a JSON file.
- Clone this repo!
yarn
to build everything.- Go to AWS Console.
- Create a Node.js 8.10 Lambda function called "rekognize" with dummy Javascript. When you create the function, add a Role giving full access to CloudWatch, Rekognition, and S3. Bump up the timeout to 30 seconds.
yarn run deploy
to deploy our code to this new Lambda function!- Go to your S3 bucket. We are going to add a trigger so that our
function fires whenever a
png
image is added. Click the "Properties" tab. Expand the "Events" panel. Add a Lambda trigger that should look like this: - Test it! Upload a png image to the S3 bucket. In a moment or so, you will see a JSON file with the results. Cool!