Yesterday, my finance agent was just a script that ran in the dark. Today, I wanted to give it a face and, more importantly, a personality. If you use finance apps, you know they are boring. They politely whisper: "You spent €50 on dining out." I didn't want polite. I wanted accountability. I wanted a "Tough Love" Financial Coach that would look at my transactions and ask: "Did you really need that Uber, Eric?"
My mission: Inject a sarcastic personality into Amazon Bedrock and expose it to the web.
The Safety Paradox (Prompt Engineering)
My first attempt was simple. I fed my banking data (via Plaid) to Amazon Bedrock and told the model: "Roast my spending habits."
It backfired. The AI became too aggressive. It started insulting my coffee habits so hard that it triggered AWS Bedrock's Safety Filters. My Lambda function crashed with a Content Blocked error. The cloud has guardrails, and I hit them at full speed.
The Fix: I had to engineer a prompt that balanced "Personality" with "Safety". Instead of asking for insults, I reframed the persona as a "Strict Financial Auditor".
I coded logic gates in Python to guide the sarcasm safely:
If 'Uber' cost < €10: Prompt the AI to ask why I didn't walk.
If 'United Airlines' appears: Prompt the AI to ask if I think I'm a millionaire.
By giving the AI specific logical boundaries, I bypassed the toxicity filters while keeping the intended "edge".
The "Headless" Frontend (Lambda Function URLs)
Up until now, I could only trigger my agent from the AWS Console. That’s not a product; that’s a script. I wanted to trigger an audit from a web browser.
Usually, you would set up API Gateway, configure routes, stages, and integration responses. That felt like overkill for a single button. So, I used Lambda Function URLs. It’s a feature that gives your Lambda a dedicated HTTPS endpoint instantly. I enabled CORS (to allow web access), and boom—my backend became a public API in seconds.
The UX Hack (Invisible Email Preheaders)
Finally, the output. The agent sends me an email via AWS SES. Sending raw HTML looks messy in the notification tray of a phone. I learned a "Pro Tip" today: Hidden Preheaders. I injected a hidden
block at the start of my HTML email. It’s invisible when you open the message, but it forces the iPhone notification to show a clean summary: "🚨 High Spending Alert | Total: €6380..." instead of raw HTML code.The Result
I built a simple HTML dashboard (hosted locally for now) with a big blue button: "Run Analysis". When I click it:
The browser calls my Lambda URL.
Lambda wakes up, fetches data from Plaid, and feeds it to Bedrock.
The AI judges me (harshly).
My phone buzzes with the verdict.
It’s not just code anymore. It’s a system with an attitude.
Tomorrow, we leave localhost behind. It’s time for React. Stay tuned.


Top comments (0)