AWS Builder Center
Building ScamLens with Amazon Bedrock and Strands: An AI-Powered Scam Detection Layer

Building ScamLens with Amazon Bedrock and Strands: An AI-Powered Scam Detection Layer

Learn how I built ScamLens, an AI-powered pre-action safety layer that analyzes suspicious messages using Strands and Amazon Bedrock, then deployed the application with Streamlit.

Every day, we receive messages asking us to click a link, verify an account, make a payment, or act immediately.
The problem? Many scams don't look like scams at first glance.
That made me think:
What if AI could act as a safety checkpoint before we take action?
That idea became ScamLens.

What is ScamLens?

ScamLens is an AI-powered pre-action safety layer that analyzes suspicious messages before users click links, share information, or make payments.
Instead of simply saying "This is a scam," ScamLens looks for signals such as:
  • Urgency and pressure
  • Identity claims
  • Payment requests
  • Verification requests
  • Requested actions
  • Social-engineering patterns
It then provides a structured result:
Risk → Category → Evidence → Recommended Action
The goal is simple: help users pause and understand the risk before acting.

How I Built It

The MVP architecture is straightforward:
User
↓
Streamlit
↓
ScamLens
↓
Strands Agent
↓
Amazon Bedrock
↓
AI Analysis
↓
Risk + Evidence + Action

Amazon Bedrock

I integrated Amazon Bedrock into ScamLens through an API so the application could send suspicious messages to a foundation model for analysis.
This was one of the most valuable parts of the project for me because I moved from simply experimenting with AI models to actually integrating one into a working application.

Strands Agents

I used the Strands Agents SDK as part of the AI workflow.
The agent handles the analysis process and connects the application logic with the model, helping turn a raw message into a structured assessment.

Streamlit

For the interface, I used Streamlit.
This allowed me to quickly turn the AI workflow into an interactive web application without spending most of the development time building a separate frontend.
The deployed application is available here:

A Quick Example

Consider this message:
URGENT: Your bank account will be blocked today. Verify your account immediately using the link below and confirm your details.
ScamLens can identify multiple warning signals:
  • Urgency
  • Threat of account suspension
  • Authority/identity claim
  • Immediate action request
  • Account verification request
Rather than relying on a single keyword, the application analyzes the message as a whole.

What I Learned

Building ScamLens taught me a few important lessons.
1. Start with the problem, not the technology.
Instead of asking "What can I build with AI?", I started with "What problem can AI help solve?"
2. The model isn't the whole product.
A foundation model is only one component. The instructions, agent workflow, output structure, interface, and testing all matter.
3. Explainability matters.
A user shouldn't just receive a risk label. They should understand why something was flagged.
4. Build small first.
For the MVP, I focused on text-based scam analysis instead of trying to build screenshot analysis, OCR, QR scanning, databases, and everything else at once.
That gave me a working product that I could actually test and deploy.

What's Next?

There are several directions I want to explore next:
  • Screenshot and OCR analysis
  • Suspicious-link analysis
  • QR-code analysis
  • Email analysis
  • More specialized scam categories
  • Larger evaluation datasets
  • Improved Explainability
The long-term idea is to make ScamLens a broader pre-action safety layer for digital communication.

Final Thought

ScamLens started with a simple idea:
Before you act, pause.
Building it gave me hands-on experience with Amazon Bedrock, Strands Agents, and Streamlit, while also teaching me that building an AI product is about much more than just calling a model.
It's about turning AI into something useful at the exact moment a user needs it.
Pause. Analyze. Think before you act.
That's ScamLens.
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