AWS Builder Center
Weekend Agent Challenge: Tech News Content Agent

Weekend Agent Challenge: Tech News Content Agent

An autonomous AI-powered agent that runs daily on a schedule, generates a tech news YouTube script using Groq AI, creates an eye-catching thumbnail with Pollinations.ai, and delivers everything to your inbox via AWS SES — all without a single button click.

🎯 Vision & What the Agent Does

Purpose

The Tech News Content Agent is a fully autonomous AI-powered agent that generates daily tech news video scripts and YouTube thumbnails — all without any human interaction. It's designed for tech content creators who want to wake up every morning with fresh, ready-to-record content in their inbox.

Problem It Solves

As a tech content creator, the hardest part of making daily YouTube videos isn't recording — it's the preparation. Every day you need to:
  • Research the latest tech news
  • Write an engaging 2-3 minute script
  • Design an eye-catching thumbnail
  • Do all this BEFORE you even hit record
This agent eliminates that entire preparation workflow. By the time you wake up, your script is written, your thumbnail is designed, and everything is delivered to your email — ready to record.

What Triggers It to Run

The agent is triggered by Amazon EventBridge Scheduler using a cron expression ( 30 0 * * ? * ) that fires every day at 6:00 AM IST (00:30 UTC). There's no button to click, no manual trigger — it runs completely on its own.

What It Does on Its Own (The Full Workflow)

Every morning at 6 AM, without any human interaction, the agent:
  1. Generates a Tech News Script — Calls Groq API (Llama 3.3 70B model) to create a 2-3 minute engaging YouTube script about the latest trending tech topics
  1. Creates a Thumbnail Title — Uses AI to generate a catchy 4-5 word ALL CAPS title optimized for YouTube CTR
  1. Generates a YouTube Thumbnail — Creates a professional 1280x720 thumbnail image using Pollinations AI with futuristic tech visuals and bold text
  1. Stores Everything in S3 — Uploads the script and thumbnail to Amazon S3, organized by date ( tech-news/2026-07-18/ )
  1. Sends an Email Report — Delivers the complete package (script + thumbnail attached) via Amazon SES to my inbox
Eventbridge schedule setup


How It Reports Back

The agent sends a comprehensive email to my inbox containing:
  • The full video script (formatted and ready to read)
  • The generated thumbnail title
  • The thumbnail image as an attachment
  • S3 links for backup access
  • A timestamp confirming when the agent ran
I literally wake up, open my email, and start recording. Zero preparation needed.
Architecture




🛠️ How You Built It

Development Process

I started by identifying the core problem: I wanted to create daily tech content on YouTube but spent 1-2 hours every morning just on preparation. The solution was clear — build an autonomous agent that handles all the prep work while I sleep.
Day 1: Planning & Core Logic
  • Mapped out the workflow (script → title → thumbnail → store → email)
  • Chose the tech stack (Groq for text, Pollinations for images, AWS for orchestration)
  • Built the Lambda function with the complete pipeline
Day 2: Integration & Testing
  • Configured all AWS services (S3, SES, EventBridge)
  • Created the Lambda Layer for the  requests  library
  • Tested the end-to-end flow multiple times
  • Fixed edge cases and error handling
Day 3: Polish & Deploy
  • Added proper error handling with try/except blocks
  • Set up the daily cron schedule
  • Verified the autonomous trigger works without manual intervention
  • Created documentation and architecture diagram

Key Decisions

  1. Groq over OpenAI — Groq provides the fastest inference speeds (up to 500 tokens/sec) with a generous free tier of 14,400 requests/day. The Llama 3.3 70B model produces high-quality scripts that sound natural and engaging.
  1. Pollinations AI for Images — After testing multiple options (Hugging Face, Together AI, Google Gemini), I chose Pollinations because it requires NO API key, has NO rate limits for basic usage, and generates decent quality 1280x720 thumbnails directly from a URL.
  1. EventBridge over CloudWatch Events — EventBridge Scheduler provides more precise scheduling, timezone support, and better retry policies than the older CloudWatch Events approach.
  1. S3 for Storage — Organizing by date ( tech-news/YYYY-MM-DD/ ) makes it easy to access any past day's content and provides a permanent backup beyond email.
  1. SES over SNS — SES allows rich HTML emails with attachments (thumbnail image), while SNS only supports plain text notifications.

Agent response


Challenges Encountered & How I Overcame Them

Challenge 1: "No module named 'requests'" Lambda doesn't include the  requests  library by default. I had to create a Lambda Layer by packaging the library using AWS CloudShell and attaching it to my function.
Challenge 2: Image Generation Quality Initially tried Hugging Face FLUX model, but Lambda couldn't reach the API (DNS resolution failed). Switched to Google Gemini API, but the model for image generation wasn't available. Finally settled on Pollinations AI which works reliably from Lambda without any API keys.
Challenge 3: Lambda Timeout The default 3-second timeout was way too short for AI API calls. Increased to 2 minutes 30 seconds to accommodate script generation (~5 sec) + image generation (~15-30 sec) + S3 upload + email sending.
Challenge 4: SES Sandbox Restrictions SES starts in sandbox mode, only allowing emails to verified addresses. Solved by verifying both sender and recipient email addresses in the same region as Lambda.
Test output in AWS Lambda




🏗️ AWS Services Used / Architecture Overview

AWS Services Used

Service
Purpose
Configuration
AWS Lambda
Main compute — runs the agent logic
Python 3.12, 256 MB, 2.5 min timeout
Amazon EventBridge Scheduler
Triggers the agent daily
Cron: 30 0 * * ? * (6 AM IST)
Amazon S3
Stores thumbnails and scripts
Organized by date folders
Amazon SES
Sends email with results
HTML email + image attachment
Amazon CloudWatch
Logging and monitoring
Auto-configured with Lambda
AWS IAM
Permissions management
S3, SES, CloudWatch access

External APIs Used

API
Purpose
Cost
Groq (Llama 3.3 70B)
Script + title generation
FREE (14,400 req/day)
Pollinations AI
Thumbnail image generation
FREE (unlimited, no key)

Architecture Diagram

╔═════════════════════════════════════════════════════════════════════════════╗
║ TECH NEWS CONTENT AGENT - ARCHITECTURE ║
╚═════════════════════════════════════════════════════════════════════════════╝
┌─────────────────┐
│ EventBridge │
│ Scheduler │
│ ⏰ 6 AM IST │
└────────┬────────┘
│
│ Triggers
│
┌────────▼────────┐
│ AWS Lambda │
│ tech-news-agent │
│ Python 3.12 │
└────────┬────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
│ │ │
┌────────▼────────┐ ┌───────▼──────┐ ┌────────▼────────┐
│ Groq API │ │ Pollinations │ │ Amazon S3 │
│ Llama 3.3 70B │ │ AI │ │ Storage │
│ │ │ │ │ │
│ 📝 Script │ │ 🎨 Thumbnail│ │ ☁️ Store Files │
│ │ │ Image │ │ │
└────────┬────────┘ └───────┬──────┘ └────────┬────────┘
│ │ │
└───────────────────┼───────────────────┘
│
┌────────▼────────┐
│ Amazon SES │
│ Email Service │
│ │
│ 📧 Compose & │
│ Send Email │
└────────┬────────┘
│
│ Email Delivery
│
┌────────▼────────┐
│ 📬 Your Inbox │
│ Daily Report │
└─────────────────┘
╔═════════════════════════════════════════════════════════════════════════════╗
║ PROCESS FLOW DESCRIPTION ║
╠═════════════════════════════════════════════════════════════════════════════╣
║ ║
║ 1️⃣ EventBridge Scheduler triggers at 6:00 AM IST every day ║
║ ║
║ 2️⃣ AWS Lambda function starts execution ║
║ ║
║ 3️⃣ Parallel API Calls: ║
║ ├─ Groq API (Llama 3.3) → Generates video script ║
║ ├─ Groq API (Llama 3.3) → Generates catchy title ║
║ └─ Pollinations AI → Generates thumbnail image ║
║ ║
║ 4️⃣ Files stored in Amazon S3 bucket ║
║ ║
║ 5️⃣ Amazon SES composes email with: ║
║ ├─ Generated script as body ║
║ ├─ Title as subject ║
║ └─ Thumbnail as attachment ║
║ ║
║ 6️⃣ Email delivered to your inbox ║
║ ║
║ ⏱️ Total Time: 60-90 seconds ║
║ 💰 Total Cost: $0.00 (Free Tier) ║
║ ║
╚═════════════════════════════════════════════════════════════════════════════╝
╔═════════════════════════════════════════════════════════════════════════════╗
║ TECH STACK COMPONENTS ║
╠═════════════════════════════════════════════════════════════════════════════╣
║ ║
║ Component │ Technology │ Cost ║
║ ──────────────────────────────────────────────────────────────────────── ║
║ Compute │ AWS Lambda │ FREE (1M requests/month) ║
║ Scheduler │ EventBridge │ FREE (432K invokes/mo) ║
║ Storage │ Amazon S3 │ FREE (5 GB) ║
║ Email │ Amazon SES │ FREE (62k emails/day) ║
║ Monitoring │ CloudWatch │ FREE (10 logs/month) ║
║ Script Generation │ Groq API (Llama) │ FREE ║
║ Image Generation │ Pollinations AI │ FREE ║
║ ║
║ ──────────────────────────────────────────────────────────────────────── ║
║ TOTAL MONTHLY COST: $0.00 🎉 ║
║ ║
╚═════════════════════════════════════════════════════════════════════════════╝
╔═════════════════════════════════════════════════════════════════════════════╗
║ DATA FLOW & DEPENDENCIES ║
╠═════════════════════════════════════════════════════════════════════════════╣
║ ║
║ Environment Variables (Stored in Lambda): ║
║ ├─ GROQ_API_KEY → Authentication for Groq API ║
║ ├─ SENDER_EMAIL → Verified SES email ║
║ ├─ RECIPIENT_EMAIL → Your inbox email ║
║ └─ S3_BUCKET → Storage bucket name ║
║ ║
║ Outputs Generated: ║
║ ├─ script.txt → ~3000-3500 characters (Video script) ║
║ ├─ title.txt → ~50-100 characters (Video title) ║
║ ├─ thumbnail.png → ~500KB-1MB (Thumbnail image) ║
║ └─ report.html → Email formatted report ║
║ ║
║ Logs & Monitoring: ║
║ └─ CloudWatch Logs → Function execution logs & errors ║
║ ║
╚═════════════════════════════════════════════════════════════════════════════╝
╔═════════════════════════════════════════════════════════════════════════════╗
║ EXECUTION TIMELINE ║
╠═════════════════════════════════════════════════════════════════════════════╣
║ ║
║ ⏱️ 6:00:00 AM IST → EventBridge Scheduler triggers ║
║ ⏱️ 6:00:05 AM IST → Lambda function starts (cold start ~5s) ║
║ ⏱️ 6:00:15 AM IST → Groq API calls initiated ║
║ ⏱️ 6:00:35 AM IST → Pollinations AI image generation starts ║
║ ⏱️ 6:01:10 AM IST → S3 upload begins ║
║ ⏱️ 6:01:20 AM IST → SES email composition ║
║ ⏱️ 6:01:25 AM IST → Email sent ║
║ ⏱️ 6:01:30 AM IST → Lambda execution complete ║
║ ║
║ Total Execution Time: ~90 seconds ║
║ Memory Peak Usage: ~103 MB / 256 MB ║
║ ║
╚═════════════════════════════════════════════════════════════════════════════╝
╔═════════════════════════════════════════════════════════════════════════════╗
║ ERROR HANDLING & SAFEGUARDS ║
╠═════════════════════════════════════════════════════════════════════════════╣
║ ║
║ If Groq API fails ║
║ ├─ CloudWatch logs error ║
║ ├─ Lambda retries (configurable) ║
║ └─ Email notification sent ║
║ ║
║ If S3 upload fails ║
║ ├─ Local storage fallback ║
║ ├─ Retry mechanism triggered ║
║ └─ Alert logged in CloudWatch ║
║ ║
║ If SES email fails ║
║ ├─ Retry with exponential backoff ║
║ ├─ Log to CloudWatch ║
║ └─ Queue for manual delivery ║
║ ║
║ Timeout Protection ║
║ ├─ Lambda Timeout: 2.5 minutes (150 seconds) ║
║ ├─ Graceful shutdown ║
║ └─ CloudWatch alert triggered ║
║ ║
╚═════════════════════════════════════════════════════════════════════════════╝

How the Agent is Triggered

The agent uses Amazon EventBridge Scheduler with a cron-based schedule:
  • Cron expression:  30 0 * * ? *  (every day at 00:30 UTC = 6:00 AM IST)
  • Target: Lambda function  tech-news-agent 
  • Retry policy: 2 retries with 1-hour maximum age
  • No human intervention required — it fires automatically every single day

Data Flow

  1. EventBridge fires at 6:00 AM IST → invokes Lambda
  1. Lambda calls Groq API → receives script text (3000+ chars)
  1. Lambda calls Groq API again → receives thumbnail title (4-5 words)
  1. Lambda calls Pollinations AI → receives thumbnail PNG (1280x720)
  1. Lambda uploads script.txt + thumbnail.png to S3 ( tech-news/YYYY-MM-DD/ )
  1. Lambda composes HTML email with SES → delivers to inbox with attachments
  1. Agent completes in ~30-60 seconds total



📚 What I Learned

New Skills Discovered

  • Lambda Layers — I learned how to package Python dependencies (like  requests ) and attach them as layers. This is essential for any Lambda function that needs external libraries.
  • EventBridge Scheduler — Understanding cron expressions and how to set up recurring autonomous triggers was a game-changer. The format  30 0 * * ? *  now makes perfect sense to me.
  • SES Email with Attachments — Learned how to use MIME multipart messages to send HTML emails with image attachments using boto3 and the  email.mime  library.

New Services Explored

  • Amazon EventBridge Scheduler — First time using this service. It's much more powerful than I expected — supports one-time schedules, recurring schedules, timezone awareness, and flexible time windows.
  • Amazon SES — Learned about sandbox mode, email verification, sending limits, and how to construct rich HTML emails programmatically.
  • Groq Cloud — Discovered how incredibly fast Groq's inference is. The Llama 3.3 70B model generates a full script in under 5 seconds!

New Approaches Discovered

  • Autonomous Agent Design — The biggest learning was thinking about software differently. Instead of "user clicks button → something happens," I learned to design for "time/event triggers → agent works independently → delivers results." This shift in mindset is powerful.
  • API Fallback Strategy — After trying 3 different image APIs (Hugging Face, Google Gemini, Pollinations), I learned the importance of having fallback options and choosing APIs that work reliably in serverless environments.
  • Cost-Zero Architecture — Learned how to architect an entire autonomous system that costs literally $0/month using AWS Free Tier and free external APIs. Everything in this project is completely free.



🔗 Link to App or Repo

The repository includes:
  • ✅ Complete source code ( lambda_function.py )
  • ✅ Detailed setup instructions ( SETUP_INSTRUCTIONS.md )
  • ✅ Architecture diagram ( architecture.png )
  • ✅ Requirements file ( requirements.txt )
  • ✅ Sample outputs (example script + thumbnail)
  • ✅ README with quick-start guide


Built with ❤️ during the AWS Builder Center Weekend Agent Challenge, July 2026
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article