Weekend Creative Agent Challenge: Daybreak Verse
An always-on AWS agent that writes a poem every morning based on the date and real weather — no prompt box, no manual trigger, just Lambda, Bedrock, and a schedule.
Vision: A Poem Waiting in the Morning
Most "AI writes you a poem" tools need a human to open an app and click generate — which isn't really autonomous, since a person is still the trigger for every output.
Daybreak Verse is a small, always-on agent that writes one short poem every morning, themed to that day's date and the real weather at a fixed location. There's no prompt box. By the time
I open the site, the poem is already there next to a photo matching the day's weather mood, with every past entry still browsable below it.
A secondary on-demand widget lets a visitor pick any of ~50 cities and get a one-off poem right now — fun, but explicitly not part of the autonomous story. It's never saved, and the page
labels it as a separate demo. Keeping those two paths separate, architecturally and not just in copy, shaped most of what follows.
How I Built It
A daily EventBridge rule invokes a Lambda ("the generator"), which fetches weather from Open-Meteo (free, keyless) for a fixed default city. A failed call doesn't stop the agent — it
falls back to theming the poem on the date alone.
The weather and date feed a prompt with a fixed shape: three stanzas of four lines each, warm and observational, explicitly told not to restate weather as raw numbers ("14mph winds" has
no place in a poem). That prompt goes to Bedrock.
Where Amazon Nova Micro Fits
The prompt goes to Amazon Bedrock using Amazon Nova Micro — an Amazon-owned model, so there was no "request model access" approval step to wait on under a hard deadline.
I ask the model for exactly one thing: the poem text, in that fixed 3×4 form, nothing else to parse out. A narrow, single-purpose prompt was the single biggest lever for consistent output
from a small model. If the call still fails after Lambda's built-in retries, the agent skips that day rather than publishing a placeholder — an honest gap looks better in a judged
submission than a broken fallback.
Generating the Daily Page
Once the poem is back, the generator searches Pixabay for a photo matching the day's weather condition, downloads it once, and stores it in the site's own S3 bucket instead of hotlinking
— so the archive stays browsable even if the source URL later changes.
It then writes the full record (date, city, weather, poem, image key) to DynamoDB, scans everything ever stored, and fully rebuilds index.html and archive.html via plain template literals
— no client-side fetching or partial patches. At one record a day, rebuilding everything each time is simpler than patching incrementally. Both pages are plain HTML/CSS and vanilla JS,
showing a weather badge with a matching emoji (☔, ☁️, and so on) beside the photo and poem.
CloudFront sits in front of the S3 bucket (Origin Access Control, no public bucket access), with a short Cache-Control on the HTML and no CreateInvalidation calls — a few minutes of
staleness doesn't matter for a once-a-day update.
A Small AWS Detail That Taught Me Something
I show the schedule's local time (06:00 Asia/Manila, from cron(0 22 * * ? *)) directly on the site — "this is automatic" is more convincing when a visitor can see exactly when the next
run happens.
Adding the Pixabay key also taught me something about least privilege: it's not a policy you write once, it's something you keep discovering the real shape of. My deploy user's IAM policy
only ever grows in response to an actual error, scoped tightly to this project. Storing the key in SSM failed on ssm:PutParameter until I added one narrowly-scoped statement.
A related bug turned up from deliberate testing, not a deploy error: firing ten concurrent requests at the on-demand endpoint for one city let all ten slip past a naive "read the
timestamp, then write" rate-limit check together. The fix was a single atomic conditional DynamoDB write that claims the day's slot up front, rejecting the rest with a 429.
AWS Architecture
- Amazon EventBridge — daily cron trigger for the autonomous path.
- AWS Lambda (×2) — Node.js 22/TypeScript; scheduled generator and on-demand handler, each with its own least-privilege role.
- Amazon Bedrock (Nova Micro) — the poem itself.
- Amazon DynamoDB (×2 tables) — the archive, and a rate-limit table for the on-demand path.
- Amazon S3 — the static site and downloaded weather photos.
- Amazon CloudFront — HTTPS distribution with Origin Access Control.
- Amazon API Gateway (HTTP API) — fronts the on-demand Lambda, throttled.
- AWS SSM Parameter Store — the one real secret this project has.
- AWS IAM — least-privilege roles per Lambda, plus a deploy policy that only grows in response to a real error.
No server ever runs outside a Lambda invocation, and no framework is anywhere in the stack. The on-demand Lambda has no S3 permissions at all, by design — no code path lets an on-demand
request land in the autonomous archive.
What I Learned
The biggest surprise had nothing to do with poems: a brand-new AWS account gets throttled on Bedrock calls almost immediately, independent of its published Service Quotas value. My first
real invocation returned ThrottlingException: Too many tokens per day despite a quota in the millions — an anti-abuse measure for unverified accounts that Service Quotas can't fix, and
that just clears on its own with time. It did, a few hours later.
Because the failure path (skip the day, no placeholder) was already built in, hitting a real throttle in production was a non-event. The general lesson: an always-on agent is more about
dependable scheduling and honest failure handling than a large interface. Missing weather, a throttled model, a failed image fetch — these are normal operating conditions for something
that runs forever unwatched, not edge cases. Designing for them up front turned every real failure I hit into a shrug instead of an incident.
Try Daybreak Verse
- Live site: https://d12kenezsixi83.cloudfront.net

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