A serverless, event-driven system that transforms field uploads into an automated travel journal using AWS services.
This is an automated travel journal built on AWS serverless infrastructure, with OpenAI and Amazon Bedrock validating audio transcriptions together. The system processes photos, videos, audio recordings, text notes and trip itinerary CSVs uploaded to S3, automatically generating timestamped blog posts served via CloudFront.
flowchart TD
accTitle: Travel and Photo Automation Workflow architecture
accDescr {
A phone calls the upload API, which needs an API key. FnGetUploadUrl returns a presigned URL and the phone uploads to the raw bucket.
S3 folder triggers on the raw bucket start different functions. A trip CSV starts FnTripIngest, which writes the DynamoDB Trip table.
Photos and videos start FnPhotoTag, which uses Rekognition labels for images, compresses to a maximum of 1920 pixel JPEG, reads the EXIF capture date and writes DynamoDB Photos and ContentStaging. Videos are staged without Rekognition.
Text notes start FnPublishTextPost, which writes ContentStaging.
Audio starts FnStartTranscribe and Amazon Transcribe. The transcript lands in audio/transcribed, and FnValidateTranscription runs an OpenAI and Bedrock consensus check and writes ContentStaging.
An hourly EventBridge schedule runs FnCreateBatchBlogPost, which reads the pending items and writes posts to the private site bucket. GenerateBlogIndex then rebuilds the per-trip index and the main index.
CloudFront reads the site bucket with Origin Access Control and serves trips.html and trip.html.
}
PHONE["Phone"] --> APIGW["API Gateway (API key)"]
APIGW --> FNURL["FnGetUploadUrl"]
FNURL -->|"presigned upload"| RAW[("Raw bucket")]
RAW -->|"trip/*.csv"| FNTRIP["FnTripIngest"]
FNTRIP --> DDBTRIP[("DynamoDB Trip table")]
RAW -->|"photos/incoming/"| FNPHOTO["FnPhotoTag (compresses to max 1920px JPEG, videos skip Rekognition)"]
FNPHOTO --> REKOG["Rekognition labels (images)"]
FNPHOTO -->|"labels and EXIF date"| DDBPHOTOS[("DynamoDB Photos")]
FNPHOTO --> STAGING[("ContentStaging")]
RAW -->|"text/incoming/*.txt"| FNTEXT["FnPublishTextPost"]
FNTEXT --> STAGING
RAW -->|"audio/incoming/"| FNSTART["FnStartTranscribe"]
FNSTART --> TRANSCRIBE["Amazon Transcribe"]
TRANSCRIBE -->|"audio/transcribed/"| FNVALID["FnValidateTranscription"]
FNVALID --> CONSENSUS["OpenAI + Bedrock consensus"]
CONSENSUS --> STAGING
EVENTS["EventBridge (hourly)"] --> FNBATCH["FnCreateBatchBlogPost"]
STAGING -->|"pending items"| FNBATCH
FNBATCH -->|"one post per trip to blog/#lt;trip#gt;/"| SITE[("Site bucket (private)")]
FNBATCH --> FNINDEX["GenerateBlogIndex"]
FNINDEX -->|"blog/#lt;trip#gt;/index.json and blog/index.json"| SITE
SITE -->|"Origin Access Control"| CF["CloudFront (OAC)"]
CF --> PAGES["trips.html / trip.html"]
Scroll sideways to see the whole diagram on a small screen.
Two buckets: one for raw uploads, one for the website. The website bucket is private behind CloudFront with Origin Access Control. S3 event notifications on folder prefixes trigger Lambda functions. Video is staged and embedded, not transcoded.
The upload API. It needs an API key, accepts only a fixed list of allowed trips, and checks the file type before issuing a presigned upload URL.
Eight functions on the active path: FnGetUploadUrl, FnTripIngest, FnPhotoTag, FnPublishTextPost, FnStartTranscribe, FnValidateTranscription, FnCreateBatchBlogPost and GenerateBlogIndex. Building posts and the hourly batch are the same function.
OpenAI (gpt-4o-mini) and Amazon Bedrock (Claude) each score the Amazon Transcribe output. If they don't both pass, a merge and re-validation stage runs, and then the result is staged.
Converts voice recordings in common audio formats (m4a, mp3, wav, webm and more) into text transcriptions automatically.
General label detection, up to 10 labels per photo, used as automatic tags.
NoSQL database storing metadata for each upload: timestamps, transcriptions, image labels, and processing status.
Scheduled events triggering hourly batch blog creation to aggregate pending content into unified posts.
Global CDN serving the static website with low latency from edge locations worldwide. The bucket is private, and CloudFront reads it with Origin Access Control.
Infrastructure as Code (IaC) that defines the core stack. Several functions, the hourly schedule and some triggers were added by hand and are documented alongside it.
Fine-grained permissions for Lambda execution roles, S3 access, and service-to-service communication. Only the two publishing functions can write to the site bucket.
Uploads go through presigned URLs from the upload API into per-trip folders in the raw bucket:
photos/incoming/, audio/incoming/ and text/incoming/,
plus trip/*.csv for the itinerary.
S3 sends event notifications to Lambda functions by folder (prefix), as shown in the flowchart:
trip/*.csv โ FnTripIngestphotos/incoming/ โ FnPhotoTagtext/incoming/*.txt โ FnPublishTextPostaudio/incoming/ โ FnStartTranscribe
.txt notes trigger FnPublishTextPost, which stages them. They publish with the next hourly batch (step 5).
FnStartTranscribe starts an Amazon Transcribe job and moves the audio to audio/processed/.
FnValidateTranscription runs when the transcript JSON lands in audio/transcribed/,
runs the OpenAI and Amazon Bedrock consensus check, and stages the result.
FnPhotoTag uses Amazon Rekognition for general label detection. It compresses the full image
(max 1920px wide, JPEG) into photos/processed/; only the full-size compressed image is kept. Labels and the EXIF capture
date are stored so posts appear in the order the photos were taken. Videos are staged without Rekognition.
An Amazon EventBridge schedule (HourlyBatchBlogPostSchedule) runs FnCreateBatchBlogPost
every hour. It reads the pending notes, transcriptions, and photo metadata from DynamoDB, assembles them
into one HTML post per trip per run, and uploads it to the site bucket.
After each batch, GenerateBlogIndex rebuilds blog/<trip>/index.json and
blog/index.json from the published posts. trip.html reads the trip index to display entries.
Users pick a trip on trips.html and read it on trip.html via CloudFront, which serves it from the private site bucket. JavaScript fetches index.json, loads individual
post HTML files, and renders them as magazine-style cards with photos, transcriptions, and notes.