I built an AI automated video generation agent using AWS. Here is how?
Project Overview – Wisdom Wealth Automated Video Generation System
This project is a fully automated, AI-powered video generation and publishing pipeline built on AWS. It generates finance-domain videos using generative AI, produces multimedia content, and automatically uploads them to YouTube.
Codebase Structure
The system consists of four independent repositories hosted on GitHub:
wisdom_wealthyoutube_video_upload_lambdawisdom_wealth_cleanerec2_start_stop_lambda
Each repository is deployed independently through CI/CD.
CI/CD Pipeline
All repositories are integrated with AWS CodePipeline, which handles automated build and deployment.
Deployment targets:
wisdom_wealth→ Deployed to Amazon EC2youtube_video_upload_lambda→ Deployed to AWS Lambdawisdom_wealth_cleaner→ Deployed to AWS Lambdaec2_start_stop_lambda→ Deployed to AWS Lambda
This separation ensures modularity, scalability, and independent lifecycle management.
Scheduled Automation Layer
A scheduled rule in Amazon EventBridge periodically triggers the ec2_start_stop_lambda.
This Lambda function:
Starts the EC2 instance (if stopped)
Initiates the video generation workflow inside the
wisdom_wealthapplication
This ensures compute resources are only active when needed, optimizing cost.
AI-Powered Video Generation Workflow
Once triggered, the wisdom_wealth The application executes the following pipeline:
Script Generation
A finance-domain script is generated using a large language model from Amazon Bedrock.
Script Processing
The generated script is:
Split into individual sentences
Each sentence is processed independently
Multimedia Generation
For each sentence:
Image generation via Amazon Bedrock image models
Audio narration generated using Amazon Polly
This creates synchronized visual and audio assets for every sentence.
Video Stitching
All generated:
Images
Audio clips
are stitched together using a video editing engine running on EC2 to produce a final video file.
Storage and Metadata Management
After video generation:
The final video is uploaded to Amazon S3
Metadata (title, description, tags, status) is stored in Amazon DynamoDB
This metadata acts as the control layer for publishing and tracking upload status.
YouTube Publishing Pipeline
The youtube_video_upload_lambda runs periodically and:
Reads pending records from DynamoDB
Uploads the corresponding video from S3 to YouTube
Updates the upload status in DynamoDB
Videos are published on the channel:
https://www.youtube.com/@trillionaireequation2074
Failure Handling & Cleanup
If a YouTube upload fails:
The
wisdom_wealth_cleanerLambda runs periodicallyIt detects failed or stale records
Performs cleanup and status correction in DynamoDB
This ensures system consistency and prevents stuck records.
Architectural Characteristics
Fully automated
Event-driven
Serverless + EC2 hybrid architecture
AI-powered content generation
Cost-optimized through scheduled compute
Modular repository structure
Production-grade CI/CD