
Weekend Showcase Challenge: Daily Haiku Gallery
See how I built an autonomous AWS serverless AI agent using Bedrock, Lambda, and CloudFront to generate and publish a daily haiku gallery.
TL;DR / Key Takeaways
- 100% Autonomous: The app runs entirely on its own every morning at 8:00 AM UTC without any manual intervention.
- Fully Serverless Architecture: Built using an AWS serverless AI agent, leveraging EventBridge, Lambda, Amazon Bedrock, SNS, S3, and CloudFront.
- Zero Ongoing Costs: The entire stack was designed to fit comfortably within the AWS Free Tier, making it a completely free project to run long-term.
Introduction
Hey everyone, what's up? If you are anything like me, you probably have a folder full of half-finished weekend projects. But this time, I wanted to build something that actually finishes itself every single day. The problem with most creative tools is that you have to remember to open them. We lead busy lives, and honestly, firing up an app just to get a spark of inspiration often feels like a chore.
The solution? An autonomous AWS serverless AI agent that does the heavy lifting for you. I built a system that wakes up, writes a unique poem, sends it to my phone, and updates a public website—all while I am still having my morning chai. This is my submission for the #application tag. In this post, I am going to break down exactly how I built the Daily Haiku Gallery, the AWS services I glued together, and the crazy amount of stuff I learned over the summer.
Let’s get into it.
Table of Contents
- Vision and What It Does
- Why I Built This (The Impact)
- How I Built It: Architecture & Challenges
- The AWS Services Used
- Key Decisions & The Solution
- What I Learned Across the Summer
- Screenshots
- Frequently Asked Questions
- Conclusion
Vision and What It Does
The core vision here was simple: the best creative tool is one you never have to open. I wanted an always-on creative agent that generates a unique, themed haiku every morning.
Here is exactly how the daily workflow operates. Every single day at exactly 8:00 AM UTC, the agent wakes up. First, it determines the current season and a specific theme based on the day of the week, like assigning "new beginnings" to Mondays or "gratitude" to Fridays. Then, it prompts Amazon Bedrock to write a classic 5-7-5 haiku.
Once the poem is ready, it doesn't just sit in a database. The agent emails it directly to my inbox via Amazon SNS. Simultaneously, it publishes the haiku as a
latest.json file to an S3 bucket. Finally, a static web page securely fetches this JSON and renders the poem in a really clean, elegant gallery for the world to see. It is fully hands-off.Why I Built This (The Impact)
Honestly speaking, maintaining servers for small hobby projects is a massive headache. You spin up an EC2 instance, forget about it, and suddenly AWS bills you for doing absolutely nothing. I wanted maximum impact with zero maintenance.
"The key lesson was that combining small, well-scoped builds produces something that feels far bigger than the sum of its parts."
By designing this strictly as an AWS serverless AI agent, I managed to keep the running cost at effectively $0. Every single service used—from Lambda's 1 million free requests per month to CloudFront's 1TB free bandwidth—stays well within the AWS Free Tier. It proves that you don't need a massive budget to deploy intelligent, production-ready AI workflows if you architect them smartly.
How I Built It: Architecture & Challenges
Building this wasn't just about writing a Python script; it was about properly wiring up the AWS ecosystem using Infrastructure as Code (CloudFormation). Here is the breakdown of the process.
The AWS Services Used
I went all-in on AWS for this. Here is the brief architecture overview:
- Trigger (EventBridge): Acts as the daily cron job that kicks off the process at 8 AM UTC.
- Compute (AWS Lambda): Runs Python 3.12 to handle the core logic, theme selection, and API calls.
- AI/ML (Amazon Bedrock): Specifically using the Nova Micro model to generate the haiku.
- Delivery (Amazon SNS): Handles the email dispatch to subscribers.
- Storage (Amazon S3): Hosts the HTML, CSS, Vanilla JS, and the daily
latest.jsonfile. - CDN (Amazon CloudFront): Delivers the site securely over HTTPS and uses Origin Access Control (OAC) to read the private S3 bucket.
Key Decisions & Challenges
One of the biggest architectural decisions was keeping the S3 bucket completely private. Instead of making the bucket public, I restricted it so only CloudFront could read the objects via Origin Access Control (OAC). This is a much better security practice.
The main challenge was handling the frontend gracefully if the daily run hadn't happened yet. I wrote the Vanilla JavaScript to fetch the
latest.json with a cache-busting query parameter (?t=timestamp) to guarantee the freshest data. If the fetch fails, it catches the error and cleanly displays a message saying today's haiku isn't ready yet.Also, dealing with CloudFormation cleanup was a hassle. If you ever try to delete the stack without emptying the S3 bucket first, it fails miserably. I had to document manual cleanup steps, especially for the Lambda CloudWatch Log Groups, which CloudFormation just leaves behind.
What I Learned Across the Summer
This project was the ultimate season-finale build for me. Looking back across the summer, the progression makes so much sense:
- Week 1: I built a Wishlist app, which taught me the importance of scoping a project tightly and actually shipping it.
- Week 2: I created a Color Palette Extractor. That week got me really comfortable with pure client-side processing and setting up S3 with CloudFront hosting and Origin Access Control.
- Week 3: I built the Daily Haiku Agent, introducing me to EventBridge scheduling, Amazon Bedrock, and SNS for an always-on workflow.
- Finale: This project brought everything together. I learned how to connect an autonomous agent on the backend with a polished frontend web app.
Screenshots










Frequently Asked Questions
Is this project really free to run?
Yes, it is effectively $0. Services like EventBridge are always free, Lambda gives you 1M requests/month, and Bedrock offers free tier credits for new accounts. As long as you stay within normal usage limits, AWS won't charge you.
How does the frontend bypass CloudFront caching for the daily JSON?
Great question. In the JavaScript
loadHaiku function, the code appends Date.now() to the JSON URL (e.g., latest.json?t=...). This cache-busting query parameter forces the browser to pull the freshest haiku instead of a stale cached version.What happens if the Lambda function fails to run?
If the Lambda agent fails to generate the
latest.json file for the day, the frontend try/catch block catches the error and displays a fallback UI telling the user to check back later or trigger the agent manually.Conclusion
Building this AWS serverless AI agent has been one of the most satisfying weekend challenges I have taken on. We went from a simple idea—a poem every morning—to a fully autonomous, cost-free, secure infrastructure utilizing modern cloud architecture.
It proves that when you piece together small, well-scoped services, you can build incredibly robust applications without breaking a sweat (or your bank account). Keep shipping!
Link to the App/Repo:
Check out the live gallery and the source code in my repository: https://github.com/ImSaMPro/AWS-Weekend-Agent-Challenge
Call to Action
Ready to build your own serverless infrastructure? Drop a comment below or check out the GitHub Repo to deploy this stack yourself!
Author Bio:
Soumyadeep is a cloud enthusiast and builder who loves turning caffeine into serverless architecture. When he is not writing Python for Lambda functions, he is probably trying to optimize his AWS billing dashboard.
Share this post:
Related Reading:
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article