Weekend Agent Challenge: ChefSense
ChefSense is an autonomous AI agent that plans your dinner before you even ask, checking the weather, your grocery budget, and recent meals to generate a fresh recommendation every day via Amazon Bedrock. Built entirely on AWS serverless services, it runs on a schedule, emails you the result, and has it waiting on a live dashboard by the time you check.
Vision & What the Agent Does
Every evening, millions of people face the same small but surprisingly draining question: what's for dinner? By the end of a long day, decision fatigue turns even a simple choice into a chore. That's the problem ChefSense was built to solve.
ChefSense is an always-on AI agent that plans dinner before you ever think to ask. Instead of opening an app, typing a prompt, and waiting for a response, ChefSense wakes up entirely on its own — triggered daily by Amazon EventBridge Scheduler, with no button click, no user session, and no human in the loop at trigger time. EventBridge doesn't do any of the actual work itself; it simply invokes the ChefSense Lambda function on schedule, and that Lambda is where everything happens. It's the one piece of the system doing all the driving — pulling in context, calling Bedrock, writing to the database, and firing off the email — end to end, in a single automated run.
Once it wakes up, the Lambda gathers context the way a thoughtful home cook would: it checks the current weather (because nobody wants a hot soup recommendation on a 95-degree day), looks at the remaining weekly grocery budget, reviews recent meals so it doesn't repeat itself, and factors in the day of the week. It feeds all of that context into Amazon Bedrock, which generates a personalized dinner recommendation, complete with a shopping list and estimated cost.
The same Lambda function then reports back in two ways, still without any outside trigger. First, it writes the recommendation to Amazon DynamoDB and sends a same-day email via Amazon SES, so the result is sitting in your inbox before you've even thought about dinner. Second, it makes the same recommendation available on a live web dashboard, hosted on AWS Amplify, which simply displays what the agent already decided — today's meal, the shopping list, the running weekly budget, and meal history. A separate, read-only Lambda behind API Gateway handles serving that data to the dashboard, but it never triggers any of the decision-making itself — it only reads what the agent Lambda already finished. Opening the dashboard isn't how the work gets done; it's just where you go to see that it already happened.
How I Built It
I started by deliberately reframing the problem away from "build a recipe app" and toward "build a workflow that runs without me." That distinction shaped every decision. A traditional web app is built around request/response: a user acts, the backend responds. ChefSense had to be built the opposite way. The backend acts first, and the frontend just reads.
That meant splitting the system into two independent Lambda functions from the start: one Lambda that does the actual agent work (gathering context, calling Bedrock, writing to DynamoDB, sending the email) and a second, read-only Lambda whose only job is to serve the latest saved recommendation to the dashboard through API Gateway. Keeping these separate turned out to be one of the best decisions in the project — the autonomous pipeline never has to know or care whether anyone is looking at the dashboard, and the dashboard never touches Bedrock or SES directly, which keeps the attack surface and IAM permissions much smaller.
For the frontend itself, I kept things intentionally simple: a plain HTML/CSS/JS dashboard, deployed and hosted through AWS Amplify. Amplify picks up the static site straight from the GitHub repo and handles the build and deployment, so pushing a change is as simple as a git push — no separate hosting setup and no manual file uploads. The dashboard code itself has one job: on load, it calls the API Gateway endpoint tied to the read-only Lambda, pulls back the latest saved recommendation, and renders it as "today's meal", the shopping list, the running grocery budget, and recent meal history. Since Amplify only ever talks to the read API, it never triggers Bedrock, DynamoDB writes, or SES directly; it's a pure display layer sitting on top of a pipeline that already finished its work by the time anyone opens the page.
A few real challenges came up along the way:
- IAM sprawl. Coordinating permissions across EventBridge, Lambda, Bedrock, DynamoDB, SES, and API Gateway meant a lot of trial-and-error with scoped policies until each function had exactly what it needed and nothing more.
- DynamoDB Decimal serialization. Numeric values (like the grocery budget) come back from DynamoDB as
Decimalobjects, which aren't natively JSON-serializable — a classic bug moment that broke my API responses until I wrote a custom encoder.
- SES configuration. Getting SES verified and sending reliably from a Lambda function (versus just testing in the console) took some extra setup around verified identities and sandbox limits.
- CORS. Since the frontend (Amplify) and the API (API Gateway) are on different origins, I had to explicitly configure CORS headers on the read API so the browser wouldn't block the dashboard's requests.
Designing an autonomous workflow instead of a request/response application was the biggest mental shift. It's easy to say, "build an agent," but actually building the plumbing so that a process runs, decides, and reports back with zero human interaction requires thinking about failure modes differently than a normal app does.
AWS Services Used / Architecture Overview
Service | Purpose |
|---|---|
Amazon EventBridge Scheduler | Triggers the agent automatically every day — no user interaction required |
AWS Lambda | Runs the agent logic and the separate read-only API |
Amazon Bedrock | Generates the personalized meal recommendation |
Amazon DynamoDB | Stores meal history and budget data |
Amazon SES | Sends the daily recommendation email |
Amazon API Gateway | Exposes the saved recommendation to the frontend |
AWS Amplify | Hosts the web dashboard |
AWS IAM | Secures permissions between every service above |
Architecture flow:
Amazon EventBridge Scheduler │ ▼ ChefSense Lambda (agent) │ ┌─────┴─────────┐ │ │ Weather API Amazon Bedrock │ │ └─────┬─────────┘ ▼ Amazon DynamoDB │ ┌──────┴────────┐ │ │ Amazon SES Read API Lambda │ │ ▼ ▼ Email Amazon API Gateway │ ▼ AWS Amplify Website
EventBridge Scheduler is the heartbeat of the whole system — it's the only thing that "starts" anything, and it starts on a clock. From there, everything is serverless: the agent Lambda does the thinking, DynamoDB is the single source of truth for what was decided, and SES and the read API are just two different ways of surfacing that decision to a human.
What I Learned
This project reframed how I think about "AI apps." Most AI demos are chat interfaces — a human prompts it and the model responds. ChefSense reinforced how different an event-driven agent architecture really is: the model is one step in a pipeline. Separating the autonomous workflow (the part that runs on a schedule and makes decisions) from the read-only frontend (the part that just displays what already happened) made the system simpler, more secure, and easier to reason about than a monolithic app would have been.
I also came away with much more hands-on comfort with EventBridge Scheduler as a trigger source, Bedrock as a callable service inside a larger pipeline rather than a standalone chatbot, and the practical details of wiring SES, DynamoDB, and API Gateway together under least-privilege IAM. The biggest takeaway: building something that works while you're not there forces you to be far more deliberate about state, permissions, and failure handling than building something that only has to work while you're watching it.
Link to App or Repo
- Live dashboard: https://main.d32604r4leqodp.amplifyapp.com/
- Source code: https://github.com/tatrinaarutyunova/ChefSense
By the time I open the dashboard each day, ChefSense has already checked the weather, remembered what I ate this week, tracked my grocery budget, decided what's for dinner, emailed me about it, and saved the whole thing with no clicks required. Dinner's planned and I'm just here to look forward to it!
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article