How I leveraged AWS SAM, Lambda, Bedrock Nova Canvas, Rekognition, and Translate to create an AI-powered cultural heritage poster generator.
Introduction
For GITEX 2025, the goal was to build an AI-powered experience that transformed attendee selfies into heritage-themed posters, each with rich UAE or KSA cultural motifs and personalized Arabic calligraphy. The project became a deep dive into scalable serverless architecture, generative AI services, and user privacy—all executed within a few short weeks.
The Challenge
- Process selfies in real-time
- Generate authentic, high-quality backgrounds
- Auto-scale and require minimal operational overhead
- Enable easy poster sharing and instant download
A serverless stack using AWS and client-side image segmentation enabled meeting every technical requirement and business need.
Architecture: Modern AWS Serverless Stack
┌───────────────────────────────────────────────┐
│ CLIENT SIDE │
│ ┌───────────┐ ┌───────────────────┐ │
│ │ Webcam │→│ MediaPipe (JS) │ │
│ └───────────┘ └─────┬─────────────┘ │
│ (selfie capture/segmentation) │
└──────────────┬───────────────────────────────┘
│ Base64 (segmented cutout)
▼
HTTPS POST to AWS Lambda Function URL
│
┌──────────────▼───────────────┐
│ Lambda │
│ ┌─────────┬───────────────┐ │
│ │Bedrock │ Rekognition │ │ (parallel)
│ │Nova │ (contextual │ │
│ │Canvas │ design) │ │
│ └─────────┴───────────────┘ │
│ │ │
│ ▼ │
│ AWS Translate │
│ (Arabic name) │
│ ↓ │
│ Image compositing │
│ ↓ │
│ S3 Poster storage │
│ ↓ │
│ QR code Generation │
└─────────┬──────────────────┘
│
▼
Client receives: Poster URL + QR Code
Under the Hood
- Amazon Nova Canvas: Text-to-image + image variation for heritage background generation
- Amazon Rekognition: Intelligent attribute detection (gender) for contextual design
- Amazon Translate: Seamless English→Arabic name translation
- AWS Lambda: Serverless image processing and compositing
- Amazon S3: Secure storage with presigned URLs
- MediaPipe: Client-side face segmentation (privacy-focused)
Implementation & Deep Dive
Client-Side Security
- MediaPipe (JavaScript) segments selfies in-browser.
- Privacy-First: Only cutouts (not full selfies) are sent to the backend.
Serverless Deployment
- AWS SAM automates all infrastructure as code.
- Lambda orchestrates: receives the base64 cutout, generates personalized backgrounds via Bedrock Nova Canvas, uses Rekognition only for context (not ID), and overlays Arabic names using AWS Translate, compositing everything into a high-resolution poster.
Key Lambda Pipeline (Python-like pseudocode):
1. Decode base64 cutout
2. Parallel: (a) Amazon Rekognition, (b) Amazon Nova Canvas generates background .
3. AWS Translate: convert English name to Arabic
4. Composite images, add branding, stylize name
5. Store poster in S3, generate presigned download URL
6. Generate + store QR code linked to poster
7. Return both URLs to client for download/sharing
Code Samples
Amazon Rekognition Code :
def detect_gender(image_bytes):
try:
response = rekognition.detect_faces(Image={'Bytes': image_bytes}, Attributes=['GENDER'])
if response['FaceDetails']:
face = response['FaceDetails'][0]
gender = face['Gender']['Value'].lower()
confidence = face['Gender']['Confidence']
if confidence > 80:
return gender
else:
return 'female'
else:
return 'female'
except Exception:
return 'female'
Amazon Translate code :
def translate_to_arabic(english_name):
try:
response = translate.translate_text(Text=english_name, SourceLanguageCode='en', TargetLanguageCode='ar')
return response['TranslatedText']
except Exception:
return english_name
Thematic Authenticity
UAE Themes
- Classic: Dubai skyline, Sadu patterns
- Modern: Dubai Marina, contemporary cityscape
- Desert: Golden dunes, Bedouin details
Each theme prompt was carefully engineered for Bedrock to ensure cultural accuracy and visual excellence.
Performance and Cost
- Median end-to-end processing time: 8–12 seconds
- Serverless scaling: no downtime or manual scaling
- Total event cost: Effective cost for all compute, storage, and AI resources
Takeaways and What’s Next
- Serverless is ideal: for bursty, unpredictable event traffic.
- Bedrock Nova Canvas: delivers fast, high-quality custom heritage scenes with prompt tuning.
- Future ideas: event-driven analytics, more languages, or NFT/AR integration.

Top comments (0)