Weekend Agent Challenge: Daily Walk Scheduler
If you're like me, you like to walk for health. This Agent looks at weather to schedule 2 30-minute walks for you.
Vision & What the Agent Does
If you're like me, you like to get daily walking in. I walk my dog twice a day and try to go for 2 30-minute walks. But each day is different - some days are hotter, some days the weather is different. Why not use AI to help? This AI checks the weather for me and proposes 2 walk times for me during the day (and allows for customizable parameters to define preferences for walks). I have it running daily in the morning (cron job at 5 AM).
It checks weather, takes in parameters from me (weather preferences, my preferred waking hours), and outputs 2 30 minute walk schedules that are at least separated by an hour. It emails me a report (via AWS SNS).
Some of the factors for my walks include temperature (not too hot or not too cold, but just right), rain, and wind. Instead of scrutinizing the weather app on my phone, why not let an AI help me pick?
Below is a succesful invocation of the Agent notifying my email via SNS!

And here's the Lambda Application showing the first invocation from the EventBridge Cron Job:

How You Built It
This was built on top of Amazon Bedrock using readily available services in AWS. Let's use off-the-shelf tools:
- EventBridge Scheduler to run the daily task.
- Lambda since this is a perfect use for serverless.
- Bedrock for the AI interface.
- S3 (to host Lambda Infrastructure).
And supporting resources: IAM, SQS, CloudFormation.
I wanted to keep this lightweight and I'm already familiar with CloudFormation and Python. Thus, the function code is written in Python, I deployed via CloudFormation, used a S3 bucket to host the Lambda code, and connected this all to Bedrock and EventBridge Scheduler to run the daily task on a cron job.
I did face some challenges hooking up the infrastructure and deploying the CloudFormation. Turns out, I put in the S3 key incorrectly and was referring to code that didn't exist! Once that was done and I troubleshooted my IAM policies, I was able to re-deploy and successfully have the agent successfully email me proposed times.
For more customization, I added variables that can be modified:
- Location via Latitude nad Longitude
- TimeZone
- Schedule Expression (Cron scheduling)
- Window Start Hour (so I can adjust when the earliest I want to start is).
- Window End Hour (when to finish walking).
- Ideal Temp Min and Max. I prefer cooler weather, but some may prefer warmer weather.
- BedrockModelId: I chose a lower cost AI Model.
- S3 Bucket/Key for S3 code.
In the future, I could see more added including UV information, consideration for my work and personal schedule as well!
AWS Services Used / Architecture Overview
We covered some of what was used above.
Core components: EventBridge for scheduling, Lambda for code harness, Bedrock for the AI interface.
Supporting: S3 (lambda storage), IAM, SQS, CW Logs, CloudFormation.
Here's what the architecture looks like:

Note: If running this, you will need to confirm the SNS subscription with your email.
What You Learned: My Learnings
This challenge helped me look at agent integrations in AWS. I think with AWS's services, Agents can be integrated to develop different types of applications that serve multiple purposes. In this case, I'm simplifying my routine by using AI to help me plan my daily exercise.
By integrating Lambda, SNS, EventBridge - a lot of the heavy lifting was done already by AWS services to quickly create this Agentic application!
An agent by itself is useful, but still needs a harness and infrastructure to make it more useful. The idea of making an "always-on" agent and having builders look at a schedule harness by using EventBridge Scheduler helped me realized the utility and simplicity of leveraging AWS services. Instead of building things from scratch, I was able to quickly scaffold around an Agent using AWS services.
I could see this becoming a personal assistant. A good part of my day is spent planning: organizing work tasks given time I have (such as scheduling large and small tasks), personal life tasks (maybe I have an appointment), and daily activities (ensuring I go for a daily walk). I like the ability for the AI Agent to suggest times and help me organize my time better.
New approach: leverage existing AWS services to help scaffold around and support AWS agents. This was one of the first times I've integrated Bedrock with Lambda, SNS, EventBridge.
Link:
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article