AWS Builder Center
Weekend Creative Agent Challenge: Daily Haiku Agent

Weekend Creative Agent Challenge: Daily Haiku Agent

Learn how to build a fully serverless Daily Haiku Agent using AWS Lambda, Amazon Bedrock (Nova Micro), and SNS. A fun weekend project for the agents challenge.

Founder & Director @ OmniAi Global Solutions | AWS UG Kolkata Leader, AWS Community Builder

TL;DR / Key Takeaways

  • Zero Maintenance: This serverless agent wakes up every morning, writes a unique haiku, and emails it to you automatically.
  • Modern AWS Stack: Powered entirely by Amazon EventBridge, AWS Lambda, Amazon Bedrock (Nova Micro), and Amazon SNS.
  • Practically Free: The entire architecture fits comfortably within the AWS Free Tier, making your monthly cost effectively $0.

Introduction

Our mornings are usually packed with checking alerts, debugging code, and rushing through emails. I wanted something different—a small, automated moment of calm before the daily grind begins. So, I decided to build something cool for the agents challenge.
The problem with most AI content generators is that they require you to actively open an app, type a prompt, and wait for a response. That is too much friction for a simple morning routine.
The solution? A fully automated, 100% serverless pipeline that does the heavy lifting for you in the background. I built the Daily Haiku Agent—a creative AI agent deployed entirely via AWS CloudFormation that crafts a fresh, themed haiku and drops it straight into your inbox every single day.

Table of Contents

  • The Vision: What It Does
  • The Architecture: AWS Services Used
  • How I Built It (Process & Decisions)
  • Project Screenshots
  • Frequently Asked Questions
  • Conclusion & What I Learned
  • Get the Code

The Vision: What It Does

The core idea is incredibly simple but effective. This always-on creative agent generates a unique, themed haiku every morning and delivers it directly to your email. No apps to open, and no buttons to press.
Here is exactly what happens every day at 8:00 AM UTC:
  • The agent figures out the current season.
  • It assigns a daily theme, like "new beginnings" for Monday or "gratitude" for Friday.
  • It builds a prompt and calls Amazon Bedrock using the Nova Micro model to write a contemplative haiku.
  • Finally, it formats the output and sends it to you via Amazon SNS.

The Architecture: AWS Services Used

When you are building at the AWS Cloud, one rule we always remember about is keeping things efficient and low-cost. I wanted this setup to run essentially for free.
With normal usage of just one invocation per day, this project costs effectively $0.
Here is the breakdown of the services pulling the weight:
  • Amazon EventBridge: Acts as our cron trigger, running the schedule reliably. It is always free for this tier.
  • AWS Lambda (Python 3.12): The brain of the operation where our application logic lives. We get 1 million free requests a month, so a daily trigger barely scratches the surface.
  • Amazon Bedrock (Nova Micro): Our AI text generator. It handles the creative heavy lifting and uses free tier credits.
  • Amazon SNS: Manages the email delivery to your inbox, giving us 1,000 free emails per month.
  • Amazon CloudWatch: Keeps track of our Lambda execution logs.

How I Built It (Process & Decisions)

Building this was a fun weekend exercise in combining Infrastructure as Code (IaC) with Generative AI.

Step 1: The Serverless Setup

I decided to use AWS CloudFormation to template the entire stack. I wrote the template using the AWS::Serverless-2016-10-31 transform. A key decision here was keeping the deployment as lightweight as possible. Instead of packaging a zip file and uploading it to an S3 bucket, I used inline Python code directly inside the CloudFormation YAML file.

Step 2: Prompt Engineering the AI

I mapped specific themes to the days of the week in Python. For example, Wednesday gets a "midweek reflection" theme, while Sunday gets "peace and renewal". The prompt specifically instructs Bedrock to return ONLY the 5-7-5 syllable haiku, with no extra conversational text or titles.

Step 3: Tackling Challenges

The main challenge was access control. By default, Bedrock models aren't instantly open to every account. Before deploying, you have to manually go into the AWS Console, navigate to Amazon Bedrock, and enable model access for Amazon Nova Micro in your region. Without doing this first, the Lambda function will throw permission errors when trying to invoke the model.

Project Screenshots

Here is a look at the system in action:

Frequently Asked Questions

How do I change the time the email is sent?
You can easily update the schedule by modifying the ScheduleExpression parameter when you deploy. Just pass a new cron value, like --parameter-overrides EmailAddress=your@email.com ScheduleExpression="cron(30 7 * * ? *)" for 7:30 AM UTC.
How do I test it without waiting for the morning?
The CloudFormation stack outputs a TestUrl. You can simply copy that Lambda Function URL and hit it with a curl command or open it in your browser to trigger an email immediately.
Will I be charged if I leave this running?
No, the resources used (Lambda, SNS, EventBridge, CloudWatch) for one run a day fall well within the AWS Free Tier. However, if you want to remove it, you can run a single aws cloudformation delete-stack command to tear down everything. Note that you might need to manually delete the CloudWatch log group, as CloudFormation doesn't remove it by default.

Conclusion & What I Learned

This project was a great reminder of how powerful and accessible serverless AI has become. What I learned most from the agents challenge is that AI agents don't always need complex multi-step reasoning loops or heavy frameworks. Sometimes, a simple Python script hosted on Lambda, calling a fast model like Nova Micro, is exactly what you need to solve a specific problem.
Infrastructure as Code makes sharing these agents incredibly easy, and chaining AWS native services together keeps the operational overhead at zero.

Get the Code

Ready to get your own daily haikus? Grab the CloudFormation template, deploy it to your account, and start your mornings with a little AI-generated creativity.

About the Author

Soumyadeep Mandal is a tech enthusiast, builder, and the leader of the AWS User Group Kolkata. He loves building serverless architectures, exploring generative AI, and sharing knowledge with the developer community.
Connect & Follow:
👉 X (Twitter)  | LinkedIn  | GitHub 

Related Reading:
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