AWS Builder Center

Building a Serverless Email Threat Triage Platform on AWS

A student-friendly architecture for analyzing suspicious emails, recording evidence, and adding location context without treating an IP address as a person’s exact location.

Email attacks often combine familiar tricks: a spoofed sender, a misleading link, an urgent request, or an unexpected attachment. For a student project, building a small threat triage platform is a practical way to learn cloud security, event-driven design, and responsible use of data.
I’m exploring this idea through SentinelTrace, a concept for an AI-assisted email threat detection and forensic platform. This article outlines one way to design its AWS foundation. It is an architecture proposal, not a claim that every component is already implemented.

The idea: turn an email into an explainable case

A useful detector should do more than label a message “safe” or “malicious.” It should preserve relevant evidence and show why a message deserves attention.
For each email, a first version could record:
  • Sender and recipient details
  • Email authentication results, when available
  • URLs and domains found in the message
  • Attachment names and file metadata
  • A risk score with the signals that contributed to it
  • Processing timestamps and analyst notes
The goal is to help a person investigate—not to make an irreversible decision based on one score.

A simple serverless architecture

A prototype can process messages as a sequence of small steps:
  1. Receive the email with Amazon Simple Email Service (Amazon SES). SES receipt rules can route incoming mail to downstream actions, including Amazon S3 or AWS Lambda. SES also provides authentication and scanning results as attributes for downstream processing; those results do not automatically determine what happens to the email. Amazon SES email receiving concepts 
  2. Store the original message in Amazon S3. Keeping the raw message separate from extracted findings gives the project a source record to revisit. Restrict access, enable encryption, and decide how long messages should be retained. Email can contain sensitive personal information, so collecting less and deleting it on schedule are important design choices.
  3. Analyze the message with AWS Lambda. A Lambda function can parse the SES event, retrieve the original message when needed, extract URLs and metadata, and apply initial rules. SES can invoke Lambda as part of a receipt rule, and its event includes message metadata. Invoking Lambda from an SES receipt rule 
  4. Save structured findings in Amazon DynamoDB. Store the analysis result separately from the raw email. A case record might include a message identifier, risk level, indicators, timestamps, and a short explanation of each signal.
  5. Send review notifications through Amazon EventBridge and Amazon SNS. EventBridge can route findings based on their severity or type, while SNS can deliver notifications to a subscribed endpoint. This keeps notification logic separate from the analysis function.
The first version does not need a large machine learning model. Start with understandable checks: failed authentication signals, suspicious URL patterns, mismatched display names, and known indicators supplied by a trusted source. The result should explain which checks fired and what they mean.

Add geolocation carefully

SentinelTrace’s concept includes geolocation context. In a prototype, that might mean looking up the approximate region associated with a public IP address found in message headers or related network evidence.
That context has limits. A location estimate may point to a VPN, corporate gateway, mobile carrier, or cloud provider. It does not establish where a person is physically located or who sent the message. Treat it as one weak signal among several, show its source and confidence, and avoid presenting a map pin as proof.
For address and place searches, Amazon Location Service provides geocoding APIs. That is different from inferring a person’s location from an IP address, so an IP intelligence source would need to be selected and evaluated separately. Amazon Location Service Geocode API 

Where AI can help

Once the basic pipeline is reliable, AI could summarize a case in plain language—for example, “The sender domain differs from the display name, and the message contains a link to an unfamiliar domain.”
Keep the original evidence alongside any generated summary. A model can make mistakes, so it should not silently alter evidence or be the only reason a message is blocked. Measure performance on a labeled set of examples, including benign messages, and review false positives before expanding the system’s role.

Security and privacy should be part of the prototype

A security tool can create new risks if it stores too much or gives broad access. For a student build:
  • Use least-privilege IAM permissions for each Lambda function.
  • Keep raw messages private in S3 and encrypt stored data.
  • Avoid logging full message bodies, credentials, or sensitive attachments.
  • Use synthetic or consented sample emails during development.
  • Set a retention period and test deletion.
  • Record why a message received a particular risk score.
Amazon GuardDuty can help monitor activity in the AWS environment, such as suspicious behavior involving supported AWS data sources. It is useful for protecting the cloud account, but it is not an email-content scanner and does not replace the message-analysis pipeline. What is Amazon GuardDuty? 

Build it in stages

A manageable project path is:
  1. Process a small set of synthetic emails.
  2. Store each message and its analysis separately.
  3. Add a dashboard that shows evidence and explanations.
  4. Measure false positives and missed detections.
  5. Add carefully scoped AI summaries only after the rules and data handling are working.
This approach keeps the project small enough to build while still demonstrating skills in serverless computing, event-driven systems, cloud security, and responsible AI.
SentinelTrace is a concept for making suspicious-email investigations clearer and more evidence-based. A thoughtful prototype can show not only how to detect risk, but also how to communicate uncertainty and protect the data being analyzed.
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