AWS Builder Center

ScamShield AI: Building an Explainable Scam Defense System with AWS Lambda and Amazon Bedrock

ScamShield AI analyzes suspicious messages and URLs using deterministic security signals and Amazon Bedrock, then turns those signals into an explainable threat assessment, attacker-intent analysis, and actionable defensive guidance.

I do Security Research, develop Custom Security tools and Explore different Fields in Cybersecurity
A scam message rarely says, “I am trying to steal your credentials.”
Instead, it creates urgency.
“Your bank account will be blocked.”
“Your KYC expires today.”
“Your parcel is stuck. Pay now.”
Modern scams are not just malicious links. They are carefully designed social-engineering attacks that exploit urgency, fear, authority, impersonation, and trust.
That is why I built ScamShield AI.
ScamShield AI is an explainable cybersecurity platform that combines deterministic threat detection with Amazon Bedrock to analyze suspicious SMS, WhatsApp messages, emails, and URLs.

The Problem

Most users don't need another tool that simply says:
“This is a scam.”
They need to understand why it is dangerous and what they should do next.
ScamShield approaches the problem as an attack-chain analysis problem.
Instead of looking at a message as just text, it looks for signals such as:
  • Artificial urgency
  • Impersonation
  • Credential requests
  • Financial lures
  • Suspicious URLs
  • Coercive language
  • Social-engineering patterns

How ScamShield Works

The system follows a three-stage pipeline:
DETECT → ANALYZE → PROTECT

1. Detect

The first layer uses deterministic cybersecurity heuristics to identify suspicious patterns in the submitted communication.
This provides structured security signals before AI-based analysis takes place.

2. Analyze

The detected signals are combined with contextual analysis using Amazon Bedrock.
Bedrock helps interpret the communication and identify:
  • Attacker objective
  • Social-engineering technique
  • Psychological pressure
  • Potential attack chain
  • Contextual risk

3. Protect

Instead of returning only a risk label, ScamShield generates an explainable security breakdown and defensive guidance.
For example:
Risk: Critical
Attack Pattern: Impersonation + Artificial Urgency
Likely Objective: Credential Theft
Recommended Action:
  • Do not open the suspicious link
  • Do not share OTP or MFA codes
  • Verify the request through an official channel
  • Avoid making payments under pressure

Scam DNA

One of the core concepts in ScamShield is Scam DNA™.
The system attempts to reconstruct the attacker's strategy:
Impersonation → Urgency → Fear → Action → Credential Theft
This makes the threat easier to understand for users who may not have a cybersecurity background.
The goal is simple:
Don't just tell people that something is dangerous. Explain what the attacker is trying to make them do.

Safe Link Gateway

ScamShield also provides a dedicated Safe Link interface.
Users can submit a suspicious URL before opening it and inspect it for suspicious patterns.
The application includes realistic threat scenarios such as:
  • SBI KYC phishing
  • Electricity cutoff scams
  • India Post parcel scams
  • Fake banking rewards
  • Credential theft
This creates a simple security checkpoint between receiving a suspicious link and interacting with it.

AWS Architecture

The backend architecture uses AWS serverless components together with Amazon Bedrock.
A scam message rarely says, “I am trying to steal your credentials.”
Instead, it creates urgency.
“Your bank account will be blocked.”“Your KYC expires today.”“Your parcel is stuck. Pay now.”
Modern scams are not just malicious links. They are carefully designed social-engineering attacks that exploit urgency, fear, authority, impersonation, and trust.
That is why I built ScamShield AI.
ScamShield AI is an explainable cybersecurity platform that combines deterministic threat detection with Amazon Bedrock to analyze suspicious SMS, WhatsApp messages, emails, and URLs — and, more importantly, explain what the attacker is trying to accomplish and what the victim should do next.

The Problem

Most security tools stop at:
“This is a scam.”
But for a non-technical user, that answer is often not enough.
They need to know:
  • Why is this message suspicious?
  • What technique is the attacker using?
  • What is the attacker trying to make me do?
  • What could happen if I follow the instructions?
  • What should I do next?
ScamShield treats scam detection as an attack-chain analysis problem, rather than simply a text-classification problem.
It looks for signals such as:
  • Artificial urgency
  • Impersonation
  • Credential requests
  • Financial lures
  • Suspicious URLs
  • Coercive language
  • Social-engineering patterns
The objective is simple:
Detect the scam. Explain the attack. Tell the user what to do next.



How ScamShield Works

ScamShield follows a three-stage security pipeline:
DETECT → ANALYZE → PROTECT

1. DETECT

The first layer uses deterministic cybersecurity heuristics to identify suspicious patterns in submitted communications.
Instead of immediately depending on an LLM, the system first extracts structured security signals from the input.
This creates a deterministic security layer that can identify patterns such as:
  • Urgency and coercion
  • Domain deception
  • Credential harvesting
  • Financial manipulation
  • Impersonation
  • Suspicious requests for sensitive information
This approach also gives the system a structured foundation for the AI analysis that follows.



2. ANALYZE

The extracted signals are then combined with contextual intelligence from Amazon Bedrock.
Bedrock helps interpret the communication in context and reconstruct the potential attacker strategy.
The analysis focuses on:
  • Attacker objective
  • Social-engineering technique
  • Psychological pressure
  • Impersonation strategy
  • Potential attack chain
  • Contextual risk
The important distinction is that ScamShield does not treat the AI response as a black-box verdict.
The deterministic signals and contextual AI analysis are fused into an explainable security assessment.



3. PROTECT

The final stage converts the analysis into actionable defensive guidance.
Instead of returning only a risk label, ScamShield provides a security breakdown that helps the user understand the threat.
For example:
Risk: Critical
Attack Pattern: Impersonation + Artificial Urgency
Likely Objective: Credential Theft
Recommended Actions:
  • Do not open the suspicious link
  • Do not share OTP or MFA codes
  • Verify the request through an official channel
  • Avoid making payments under pressure
The goal is to move the user from detection to informed action.



Scam DNA™

One of the core concepts behind ScamShield is Scam DNA™.
A scam is often a sequence of psychological and technical steps rather than a single malicious action.
For example:
Impersonation → Urgency → Fear → Action → Credential Theft
ScamShield attempts to reconstruct this chain so that the user can see the attacker's strategy.
This is particularly important for social-engineering attacks because the most dangerous part of the attack may happen before a malicious payload is ever executed.
The attacker first needs the victim to trust the message.
Then they create pressure.
Then they push the victim toward an action.
ScamShield is designed to expose that progression.
Don't just tell people that something is dangerous. Explain what the attacker is trying to make them do.



Safe Link Gateway

ScamShield also includes a dedicated Safe Link Gateway.
Users can submit a suspicious URL before interacting with it.
The interface provides a zero-click inspection workflow designed to identify suspicious URL patterns before the user proceeds.
The application includes realistic threat scenarios such as:
  • SBI KYC phishing
  • Electricity cutoff scams
  • India Post parcel scams
  • Fake banking rewards
  • Credential theft
The idea is simple:
Pause → Inspect → Understand → Decide
Instead of clicking first and investigating later, the user gets a security checkpoint before interacting with a suspicious destination.



AWS Architecture

ScamShield is designed around AWS serverless components and Amazon Bedrock.
The core processing flow is: AWS Architecture
User
↓
API Gateway
↓
AWS Lambda
↓
Deterministic Threat Engine
↓
Risk Signal Fusion
↓
Amazon Bedrock
↓
Explainable Threat Analysis
↓
Defensive Guidance
This architecture separates deterministic security logic from contextual AI reasoning.
That separation is important because cybersecurity systems should not blindly delegate every security decision to an LLM.
The deterministic layer provides structured threat signals, while Amazon Bedrock adds contextual reasoning and explanation.

Why a Dual-Layer Approach?

Large language models are powerful at understanding context, but security systems also benefit from predictable and auditable rules.
ScamShield therefore uses a dual-layer approach:
Deterministic Rules + Amazon Bedrock
The deterministic engine identifies known security signals.
Amazon Bedrock interprets those signals in context and helps reconstruct the broader attack strategy.
The result is intended to provide both:
  • Structured detection
  • Contextual explanation
This makes the system more suitable for an explainable cybersecurity workflow than relying on a single opaque classification step.

Privacy by Design

Scam analysis can involve sensitive communications, so privacy was considered as part of the architecture.
ScamShield follows a stateless, memory-only processing model for submitted payloads.
The application enforces a bounded input size and processes the submitted communication for analysis rather than building a persistent message database.
The interface explicitly communicates:
Zero-Storage • Memory-Only Analysis
The system also applies input sanitization and security boundaries around the analysis pipeline.

Security Considerations

Because ScamShield itself processes potentially malicious or adversarial input, the application was designed with security controls around the AI pipeline.
Key considerations include:
  • Input sanitization
  • Bounded payload size
  • Zero-PII-oriented processing
  • Separation between deterministic rules and AI reasoning
  • Defensive prompt handling
  • OWASP LLM security considerations
  • Controlled server-side AI execution
  • Stateless analysis
The objective is not only to build an AI application that detects scams, but to build the AI application itself with a cybersecurity mindset.

From Detection to Defense

The central idea behind ScamShield is that scam detection should not end with a red warning.
A useful security tool should answer three questions:
What happened?
Why is it suspicious?
What should I do now?
DETECT ↓ Identify suspicious signals ↓ ANALYZE ↓ Understand attacker intent and attack chain ↓ PROTECT ↓ Provide actionable defensive guidance
This turns scam detection from a simple classification problem into an explainable defensive workflow.

Built for Real-World Social Engineering

Scams continuously evolve.
Attackers change domains, wording, impersonation targets, payment methods, and psychological tactics.
But many attacks continue to rely on the same underlying principles:
Trust. Urgency. Fear. Authority. Deception.
ScamShield is built around recognizing these signals and connecting them into a coherent threat narrative.
A suspicious message should not simply make a user afraid.
It should make them stop, understand, and make a safer decision.

The Vision

ScamShield AI is a step toward making cybersecurity analysis more understandable and actionable for everyday users.
The long-term vision is to bridge the gap between sophisticated threat analysis and the person sitting on the other side of a WhatsApp message, SMS, email, or suspicious link.
Because the most effective security warning is not always:
“BLOCK THIS.”
Sometimes it is:
“Here is what the attacker is trying to make you do — and here is how you can stop the attack.”

Built for AWS / WeMakeDevs First Commit

ScamShield AI was built for the AWS / WeMakeDevs First Commit Hackathon with a focus on explainable scam detection, serverless AWS architecture, and Amazon Bedrock-powered contextual threat analysis.
The project brings together:
AWS API Gateway + AWS Lambda + Amazon Bedrock + Deterministic Cybersecurity Heuristics + Explainable Threat Analysis
The result is ScamShield AI:
Detect the scam. Understand the attack. Know what to do next.
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