The below architecture shows you how to build a serverless chatbot on AWS that monitors your chat channels and removes images containing suggestive or explicit content. 

Gliffy Macro Error

You do not have permission to view this diagram.

#Description
1A user posts a message containing an image to a chat app channel that's monitored by a chatbot.
2The chat app posts the event to an Amazon API Gateway API for the chatbot.
3The chatbot validates the event. This event triggers an AWS Lambda function that downloads the image.
4Amazon Rekognition's image recognition feature checks the image for suggestive or explicit content.
5The chat app API deletes and image containing explicit or suggestive content from the chat channel.
6The chatbot uses the chat app API to post a message to the chat channel detailing deletion of the image.