Midnight UTC
Midnight-UTC is an always-on AI agent that autonomously writes and publishes a brand-new original song every day at midnight UTC — no human trigger needed. It picks a mood based on the day of week and season, then generates full lyrics, chords, BPM, and key using Amazon Bedrock (Nova Lite). AWS Lambda and EventBridge Scheduler drive the daily cycle, while S3 stores and hosts the results as a live static site. A tiny serverless songwriter that never stops working.
Weekend Creative Agent Challenge: Midnight-UTC (Daily Lyrics Agent)
Tags: agents
Vision & What It Does
Midnight-UTC is an always-on AI songwriter that composes a brand-new song every single day — completely on its own, with no human in the loop. Every night at midnight UTC, the agent wakes up, looks at what day of the week and season it is, and writes an entirely original song themed around that context: a Monday in winter gets something melancholic and hopeful, a Friday in summer gets something euphoric and full of fireflies-and-open-windows imagery.
The problem I wanted to solve was simple: most "AI creative" demos are reactive — you type a prompt, you get an output, the moment passes. I wanted something that felt alive on its own schedule, like a tiny musician living in the cloud who shows up to work every day whether or not anyone is watching. The creative output isn't just a lyric dump either — the agent returns a full composition package: title, verses, chorus, bridge, chord progression, BPM, key, mood, genre, and a short performance note, as if a session musician had faxed over a lead sheet.
The result gets published to a static website that refreshes with "today's song," plus a growing daily archive, so anyone can visit and see what the agent wrote for that specific day.
How You Built It
I started by scoping the smallest possible loop: a scheduled trigger, a generative call, and a place to store and display the result. The first key decision was choosing Amazon Bedrock's Nova Lite model instead of a heavier model — it's fast, inexpensive, and more than capable of structured creative writing when given a well-built prompt, which mattered a lot since this needed to run autonomously every day without racking up cost.
The trickiest part was prompt design. Early attempts produced generic, forgettable lyrics no matter the day. The fix was building context deliberately into the prompt: mapping each day of the week to an emotional register, and each season to a concrete imagery palette, rather than just asking for "a song." Once the Lambda function assembled this richer, contextual prompt and asked for a strict JSON response, the outputs became genuinely distinct day to day.
Another challenge was making the whole thing deploy cleanly and repeatably. I wrote a one-command PowerShell deployment script that provisions the S3 bucket with static website hosting, creates a least-privilege IAM role, packages and deploys the Lambda function, sets up the EventBridge schedule, and uploads the site — then immediately invokes the Lambda so there's a song waiting the moment deployment finishes. Getting the IAM permissions scoped tightly (Bedrock invoke + S3 read/write only, nothing more) took a few iterations of trial and error via CloudWatch logs.
AWS Services Used / Architecture Overview
Services used (entirely within AWS Free Tier):
Amazon Bedrock (Nova Lite) — generates the song: lyrics, chords, mood, BPM, key, performance notes
AWS Lambda (Python 3.12) — the agent runtime; builds the daily prompt, calls Bedrock, writes results to S3
Amazon EventBridge Scheduler — fires a daily cron to trigger the Lambda at midnight UTC
Amazon S3 — stores the archive (compositions/YYYY-MM-DD.json), the current song (latest.json), an index of past songs, and hosts the static website itself
Flow:
Code
EventBridge Scheduler (daily cron)
│
▼
AWS Lambda (Python)
│
├─ Calls Amazon Bedrock Nova Lite → returns song as structured JSON
│
└─ Writes to Amazon S3
├─ compositions/2026-08-21.json (archive)
├─ latest.json (today's song)
├─ index.json (archive list)
└─ index.html / style.css / app.js (the site itself)
The site is a plain static frontend (HTML/CSS/JS) that fetches latest.json and renders it — no backend server, no database, nothing to keep running or paying for beyond the scheduled Lambda invocation.
What You Learned
This challenge taught me a lot about designing prompts for structure, not just tone — getting Nova Lite to reliably return clean, parseable JSON with creative fields (chords, BPM, mood) required being explicit about the exact schema every time, not just describing the vibe I wanted. I also got much more comfortable treating IAM as part of the design process rather than an afterthought — writing the deploy script forced me to think about exactly what the Lambda needed access to, and nothing more.
The biggest realization was architectural: an "agent" doesn't need a chat interface or a human prompt to feel like an agent. A cron trigger, a model call, and a place to publish results is enough to create something that behaves autonomously and produces something new every day. Keeping the whole thing serverless also drove home how far the AWS Free Tier stretches for a project like this — the entire pipeline runs at essentially no cost.
Link to App or Repo
Source code: https://github.com/nanduathulkrishnak-cmyk/Midnight-UTC
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article