AI Celebrity Detector API
An AWS-backed celebrity recognition system that identifies famous faces in uploaded photos using Amazon Rekognition, stores analysis history in DynamoDB, and exposes serverless endpoints via API Gateway and Lambda.
Screenshots


Key Metrics
Serverless HTTP API Gateway & Lambda
Amazon Rekognition RecognizeCelebrities
ap-south-1
Private S3 & Short-Lived Presigned URLs
Automated boto3 Scripts
Overview
AI Celebrity Detector API is an AWS serverless recognition platform that identifies famous personalities in uploaded photos. Built with Flask, Python, and boto3, the system automates image uploads to private S3 storage, executes celebrity detection via Amazon Rekognition through an API Gateway HTTP API and AWS Lambda, and persists detection logs in DynamoDB for historical tracking.
Problem
Building scalable image recognition APIs requires managing compute servers, securing user uploads to avoid public asset exposure, and provisioning multi-service cloud infrastructure without relying on error-prone manual console setup steps.
Solution
Built an idempotent infrastructure automation suite (provision.py & teardown.py) using boto3 to provision a serverless pipeline on AWS. The system routes uploads to private S3 buckets, generates short-lived presigned URLs for client previews, executes multi-celebrity detection via Lambda and Rekognition, and persists screening history in DynamoDB.
Architecture
Serverless microservice architecture running on AWS ap-south-1. A local Flask proxy handles photo uploads (/api/upload) to private S3 storage and issues presigned URLs. Image analysis requests (/api/analyze) are routed through AWS API Gateway HTTP API to an AWS Lambda function (celebrity-detector-function). Lambda invokes RecognizeCelebrities on Amazon Rekognition and writes detection metadata (celebrity name, confidence, bounding boxes, unrecognized face count) directly to DynamoDB (CelebrityDetections table).
Challenges
- Securing uploaded media in private S3 buckets while rendering immediate client previews using short-lived AWS presigned URLs.
- Idempotently orchestrating 5 AWS services (S3, DynamoDB, IAM, Lambda, API Gateway) via boto3 without manual console actions.
- Parsing and storing multi-face recognition payloads and unrecognized face metrics from Amazon Rekognition into DynamoDB.
- Managing cross-origin request proxying between the local Flask dev server and AWS API Gateway endpoints.
Lessons Learned
- Serverless API development using AWS API Gateway HTTP APIs and AWS Lambda.
- Pre-signed URL generation and secure private S3 object handling.
- Infrastructure-as-code automation using Python boto3 SDK.
- Celebrity recognition payload handling and confidence score processing in Amazon Rekognition.
- DynamoDB schema design for multi-entity detection history.
Future Improvements
- Fully serverless frontend deployment using AWS CloudFront and S3 static hosting.
- Real-time notification streams for celebrity detection using AWS SNS.
- Adding automated facial tagging and bounding box overlays on the web UI.
- API rate limiting and key-based authentication on API Gateway routes.