Skip to content

AWS application using CDK to process images from s3 via Lambdas/Rekognition/EventBridge

License

Notifications You must be signed in to change notification settings

makit/s3-rekognition-eventing

Repository files navigation

AWS S3 Rekognition Processing With Events

This project contains a CDK application that builds a AWS application utilising SES, S3, SNS, SQS, Lambda EventBridge and Rekognition which will trigger when images are placed within a bucket (analyse/ prefix), detect objects in the images and then fire events with these object labels that are then filtered to specific priority based topics for different types of notification.

If SES is setup to receive email then this application can be configured with this email address and it will setup a SES rule to store emails to an S3 bucket, there a lambda will trigger to extract the attachment images - which will then trigger the object detection.

Example Use Case

Snapshots of movement could be uploaded to S3, or extracted from email attachments by SES, and then depending on the objects that are detected it could send a Text Message, send an Email, or do nothing. For example, a person detected could be a text and email. A dog could trigger an email only, and a bird could simply not notify at all.

This can easily be expanded to store the images, along with labels into an archive for later quering with Athena as well. Could also have a lambda that builds and sends an email via SES with the images attached, along with the labels.

Diagram

Diagram

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

About

AWS application using CDK to process images from s3 via Lambdas/Rekognition/EventBridge

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published