🧠 Building an Event-Driven Facial Analysis App with AWS Rekognition


🔍 Project Overview
Project Name: Event-Driven Facial Analysis
Core Services: S3, Lambda, Rekognition, DynamoDB, IAM
Architecture Style: Event-driven, serverless
Difficulty: Easy/Medium
Cost: Free-tier friendly
💡 Problem Statement
Facial analysis is being widely used today in areas like:
Identity verification
Security & surveillance
User behavior analytics
Most facial detection tools are either costly or complex to integrate. My goal was to build a simple but scalable cloud-native solution to process user-submitted images in real-time.
🏗️ Architecture Diagram
Here’s a breakdown of the flow:
User uploads a photo to an S3 bucket
S3 triggers a Lambda function
Lambda calls Amazon Rekognition to analyze the face
Extracted metadata (age, emotions, etc.) is saved in DynamoDB
🔧 Services Used
Service | Role |
S3 | Stores the uploaded images |
Lambda | Serverless compute to trigger facial analysis |
Rekognition | Detects facial attributes (eyes open, emotions, age range, etc.) |
DynamoDB | Stores structured metadata for later use |
IAM | Manages permissions for S3 triggers, Rekognition, and DynamoDB access |
💥 Key Challenges
IAM Permissions Hell 😵
Rekognition couldn’t read the S3 object: Fixed by allowing
s3:GetObject
to RekognitionLambda couldn’t write to DynamoDB: Solved using a custom inline policy
Understanding Event Payloads
- Learning how the S3 event JSON is structured was crucial for parsing image names
Dealing with S3 Key Encoding
- Filenames with spaces caused issues → replaced
+
with space or usedurllib.parse.unquote
- Filenames with spaces caused issues → replaced
✅ Final Result
Upload an image to S3, and boom 💥
Face metadata (like
AgeRange
,Emotions
,EyesOpen
) appears in DynamoDB instantly!All 100% serverless with minimal cost and maximum scalability.
📂 GitHub Repository
Feel free to clone it, improve it, or use it in your own cloud portfolio!
🔥 Lessons Learned
IAM is tricky but mastering it is non-negotiable
Rekognition is insanely powerful and simple to use
Serverless event-driven apps are a game-changer for real-time use cases
🚀 What’s Next?
I'm building a complete AWS Projects Portfolio — real-world apps using real AWS services — not just "hello world" stuff.
Next stop: AI Customer Service Bot using Bedrock/SageMaker!
Follow my journey at 👉 abdulraheem.hashnode.dev
Or connect on GitHub 👉 github.com/abdulraheem381
💬 Have Questions?
Let me know in the comments
Happy building, and see you in the cloud ☁️
Subscribe to my newsletter
Read articles from Abdul Raheem directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Abdul Raheem
Abdul Raheem
Cloud DevOps | AWS | Terraform | CI/CD | Obsessed with clean infrastructure. Cloud DevOps Engineer 🚀 | Automating Infrastructure & Securing Pipelines | Bridging Gaps Between Code and Cloud ☁️ I’m on a mission to master DevOps from the ground up—building scalable systems, automating workflows, and integrating security into every phase of the SDLC. Currently working with AWS, Terraform, Docker, CI/CD, and learning the art of cloud-native development.