Automatic Image Tagging with Amazon Rekognition

Amazon S3 → AWS Lambda → Amazon Rekognition

An event-driven workflow to automatically detect and tag moderation labels within images using Amazon Rekognition, AWS Lambda, and Amazon DynamoDB.

This sample project demonstrates how to deliver an event-driven architecture to detect moderation labels within images, while storing these tags in Amazon DynamoDB.
This pattern allows you to store image files in an Amazon S3 bucket, which triggers the workflow. Upon an object being created in the S3 bucket, a Lambda function is invoked, which initiates Amazon Rekognition's DetectModerationLabels function. Once a the function call is finished and it has retrieved the potential moderation labels, the Lambda stores this information in our DynamoDB table.
This pattern deploys one S3 bucket, 1 Lambda Function, and 1 DynamoDB Table.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd https://github.com/aws-samples/serverless-patterns/main/rekognition-image-moderation-tagging/template.yaml

Deploy

sam deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete

Created by:

Jack Le Bon

Jack Le Bon

AWS Solutions Architect

Follow on LinkedIn