AWS Builder Center

Weekend Creative Agent Challenge: Daily Poem Agent

Every morning, most of us open our phones to notifications, emails, and news. What if instead, something beautiful was already waiting for you, a poem written just for today, for this exact date, generated fresh while you were sleeping? That is exactly what the Daily Poem Agent does.

Vision and What It Does
Every morning, most of us open our phones to notifications, emails, and news. What if instead, something beautiful was already waiting for you — a poem written just for today, for this exact date, generated fresh while you were sleeping?
That is exactly what the Daily Poem Agent does. It is an always-on autonomous agent deployed on AWS that wakes up every morning at 6 AM, writes a brand new poem about the current day using AI, and publishes it to a live webpage — all without any human involvement. By the time you open your browser, the poem is already there.
No app to open. No prompt to type. It just works.
The live app is here:  link 



How I Built It
The goal was to keep the architecture as simple as possible while still qualifying as a true autonomous agent — something that runs on its own, produces creative output, and is always available.
I started by writing a single Python function that does three things in sequence: call Amazon Bedrock to generate a poem, build an HTML page around it, and upload that page to S3. That is the entire core logic — under 60 lines of code.
The key decision was using Amazon Nova Lite as the model. It is fast, cost-effective, and more than capable of generating vivid, emotional poetry. I pass it the current day and date as context so every poem feels specific to that moment rather than generic.
For the HTML output, I wanted it to feel like an actual product — not a raw text dump. So I built a dark-themed card layout with a glassmorphism effect, italic Georgia font, and subtle gradient background. The result looks like something you would actually want to visit daily.
The hardest part was getting the Bedrock API call format right. Nova Lite requires the message content to be passed as a JSON array, not a plain string. That caused a ValidationException on the first test run. Once I fixed that, everything worked on the next attempt.




AWS Services Used
  • Amazon Bedrock (Nova Lite) — generates the poem using a natural language prompt that includes the current day and date
  • AWS Lambda (Python 3.12) — runs the core logic, calls Bedrock, builds the HTML, uploads to S3
  • Amazon EventBridge — triggers the Lambda function every day at 6 AM UTC using a cron schedule ( cron(0 6 * * ? *) )
  • Amazon S3 — stores and serves the generated HTML page as a static website with a public URL
Architecture flow: EventBridge (daily cron) → Lambda → Bedrock Nova Lite → S3 Static Website → Public URL
All four services are available on the AWS Free Tier. The entire build costs effectively nothing to run.


What I Learned
Agents do not need to be complex. The word "agent" can sound intimidating — it suggests something with memory, tools, multi-step reasoning. But at its core, an agent is just something that acts on its own. This project taught me that even a simple scheduled Lambda function qualifies, as long as it produces meaningful autonomous output.
The Bedrock API has strict input formatting. The Nova Lite model requires message content as a JSON array with a  text  field inside — not a plain string. This is easy to miss and causes a cryptic ValidationException. Always check the exact API schema before testing.
IAM permissions are the most common failure point. Lambda needs explicit permissions to call both Bedrock and S3. Without attaching the right policies to the execution role, the function fails silently or with confusing errors. Setting this up correctly early saves a lot of debugging time.
Static S3 websites are underrated. For a simple read-only output like this, S3 static hosting is perfect. No server, no framework, no maintenance. Just upload an HTML file and it is live. Combined with a Lambda that regenerates it daily, you get a fully functional dynamic website with zero infrastructure overhead.
Prompting for specificity matters. Early tests with a generic prompt produced generic poems. Adding the day name and full date to the prompt made the output feel personal and timely — like the AI was actually aware of the moment it was writing in.


What Is Next
A few natural extensions for this project:
  • Add weather data to the prompt so the poem reflects today's actual weather
  • Store all past poems in S3 with date-based filenames to build an archive
  • Send the daily poem via email using Amazon SES
  • Add a DynamoDB table to track style evolution over time


Repo and Live App


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