
Weekend Agent Challenge: Daily Weather & Quote Agent
AWS Serverless Agent that sends daily morning weather & motivational quote emails using Lambda, EventBridge, and SES
š Vision & What the Agent Does
Every morning, the first thing most people check is the weather ā "Should I carry an umbrella?", "Is it going to be hot today?", "What should I wear?" ā and then they scroll through social media looking for some motivation to start the day. What if an intelligent agent could handle both of these tasks automatically?
The Daily Weather & Quote Agent is an AWS-powered serverless agent that solves this exact problem. It eliminates the need to manually check weather apps or motivational pages every morning by delivering a personalized email right to your inbox at 7:00 AM IST, every single day ā without any human intervention.
What Problem Does It Solve?
- ā No more opening multiple apps in the morning
- ā No more forgetting to check weather before leaving home
- ā No more searching for daily motivation
- ā One automated email with everything you need to start your day
How It Works (Autonomous Behavior):
- Trigger: Amazon EventBridge fires a scheduled cron event every day at exactly 7:00 AM IST (1:30 AM UTC)
- Execution: AWS Lambda function activates automatically ā no manual trigger needed
- Weather Fetch: The agent calls the wttr.in API to get real-time weather data (temperature, conditions) for Chennai
- Quote Selection: A motivational quote is randomly selected from a curated collection of 10 powerful quotes
- Email Composition: The agent composes a clean, friendly morning email with weather + motivation
- Delivery: Amazon SES delivers the email to the configured recipient
- Reporting: CloudWatch Logs capture every execution for monitoring and debugging
The agent runs completely autonomously ā once deployed, it requires zero human interaction. It reports success/failure through CloudWatch logs and the email delivery itself serves as confirmation.

š ļø How I Built It
Development Process
I built this entire project using only the command line (CMD/PowerShell) on Windows ā no AWS Console UI clicks. This was a deliberate choice to learn infrastructure-as-code principles and become comfortable with AWS CLI.
Key Decisions:
Decision | Why |
|---|---|
wttr.in over OpenWeatherMap | No API key needed, faster setup, equally reliable |
Random quotes over Bedrock AI | Bedrock model (Claude Haiku) was marked Legacy; random quotes ensure 100% reliability |
Python 3.12 runtime | Latest stable runtime with best performance |
SES over SNS | Email allows richer formatting than SMS |
us-east-1 region | Best service availability and lowest latency for SES |
Challenges & Solutions:
Challenge 1: Files not created in CMD
When I started, I typed Ā
index.pyĀ in CMD expecting it to create a file ā but CMD doesn't work that way! I learned to use Ā echoĀ commands and Ā notepadĀ to create files from the terminal.Challenge 2: OpenWeatherMap 401 Unauthorized
My initial approach used OpenWeatherMap API, but new API keys take up to 2 hours to activate. Solution: Switched to wttr.in ā a free weather service that requires no API key at all.
Challenge 3: Bedrock Model Access Denied
The Ā
anthropic.claude-3-haikuĀ model was marked as "Legacy" by the provider. Instead of waiting for model access approval, I pivoted to a random quote selection system ā simpler, faster, and equally effective for the use case.Challenge 4: SES Email Verification
SES in sandbox mode requires both sender AND receiver emails to be verified. I had to verify both email addresses before emails could be sent successfully.
Challenge 5: Lambda deployment timing
After updating Lambda code, I kept getting errors because the function was still in "InProgress" state. Solution: Added Ā
timeout /t 10 between deploy and invoke commands.
šļø AWS Services Used / Architecture Overview
Services:
AWS Service | Role in Architecture |
|---|---|
AWS Lambda | Core compute ā runs the Python 3.12 function |
Amazon EventBridge | Scheduler ā triggers Lambda via cron expression |
Amazon SES | Email service ā sends the morning email |
AWS IAM | Security ā least-privilege role for Lambda |
Amazon CloudWatch | Monitoring ā logs every execution |
Architecture Diagram:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā
ā ā° Amazon EventBridge ā
ā ā Schedule: cron(30 1 * * ? *) [7:00 AM IST Daily] ā
ā ā ā
ā ā¼ ā
ā ā” AWS Lambda (Python 3.12) ā
ā ā Function: DailyWeatherAgent ā
ā ā Memory: 128MB | Timeout: 30s ā
ā ā ā
ā āāāāāāāāāāāāāāāāāāāāāāā ā
ā ā¼ ā¼ ā
ā š¦ļø wttr.in API š¬ Quote Engine ā
ā ā GET /Chennai ā 10 Motivational Quotes ā
ā ā ā temp_C ā ā random.choice() ā
ā ā ā weatherDesc ā ā
ā ā ā ā
ā āāāāāāāāāāāā¬āāāāāāāāāāā ā
ā ā¼ ā
ā š§ Amazon SES ā
ā ā From: abishek.s.ece.2023@snsce.ac.in ā
ā ā To: dharaneesh85260@gmail.com ā
ā ā ā
ā ā¼ ā
ā š¬ Recipient Inbox ā
ā "Good Morning, Abishek! Weather: 29C, Sunny..." ā
ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāHow the Agent is Triggered:
The agent uses event-driven architecture. Amazon EventBridge evaluates a cron expression (Ā
cron(30 1 * * ? *)Ā ) every minute. At exactly 1:30 AM UTC (7:00 AM IST), it generates an event that invokes the Lambda function. The Lambda function has a resource-based policy allowing EventBridge to invoke it. No polling, no servers running 24/7 ā pure event-driven serverless execution.
š What I Learned
Technical Skills:
- AWS CLI Mastery: Deployed an entire serverless application without touching the AWS Console UI ā everything through command-line commands
- IAM Security: Created custom trust policies and permission policies with least-privilege access (only SES and CloudWatch permissions)
- Serverless Architecture: Understood how EventBridge + Lambda creates a powerful event-driven system with zero idle costs
- SES Email Service: Learned about sandbox mode, email verification requirements, and sending limits
- Debugging Lambda: Used CloudWatch logs and manual invoke to debug issues iteratively
Problem-Solving Approaches:
- Pivot quickly: When OpenWeatherMap API took too long to activate, I immediately switched to wttr.in
- Simplify when needed: When Bedrock had access issues, I used random quotes ā simpler is often better
- Test iteratively: After each code change, I zipped, deployed, and tested immediately
Key Takeaways:
- šÆ Start simple, iterate fast ā Get a working version first, then enhance
- š§ CLI-first approach builds deeper understanding than UI clicks
- š” Free APIs exist for almost everything ā wttr.in proved you don't always need paid services
- šļø Serverless is powerful ā this agent runs 24/7 for ā¹0/month
- š Security matters ā always use least-privilege IAM roles

š Link to App & Repo
- GitHub Repository: Ā https://github.com/abisheksece2023-cloud/daily-weather-agent.gitĀ

š Project Stats
Metric | Value |
|---|---|
Total Development Time | ~2 hours |
Lines of Code | ~50 (Python) |
AWS Services Used | 5 |
Monthly Cost | ā¹0 (Free Tier) |
Emails Sent Daily | 1 |
Uptime Required | 0% (serverless!) |

Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article