Building an AI-Powered Anti Money Laundering Detection System with AWS
In this project, we built an AI-powered platform to detect suspicious financial transactions and help investigators understand risky activity. We used AWS services such as Amazon S3 and Amazon DynamoDB to build the cloud storage and investigation workflow, with a serverless architecture planned around AWS Lambda and AWS SAM.
Building an AI-Powered Anti Money Laundering Detection System with AWS
Money laundering is a major problem for banks and financial companies because millions of transactions happen every day. Finding suspicious activity manually can take a lot of time.
To solve this problem, our team built an Anti Money Laundering Detection platform that uses machine learning, rules, statistical analysis, and graph analysis to find unusual transaction behaviour.
The main goal was simple: help an investigator quickly find suspicious transactions and understand why they were flagged.
What does our project do?
Our system takes financial transaction data and analyses different patterns in the data.
It can help identify activities such as:
- Unusual transaction amounts
- Structuring of transactions
- Rapid movement of money
- High transaction frequency
- Fan-in and fan-out transaction patterns
- Suspicious connections between accounts
- Anomalous transaction behaviour
The system then generates a risk score and investigation information that can be used by an analyst for further review.
A high-risk result is treated as an investigation lead and not as proof of financial crime. Human review is still required.
Why did we use AWS?
We wanted to move part of our project from a local setup to a cloud-based architecture.
AWS helped us separate different parts of the application. Instead of keeping all the data and investigation information on one machine, we could use different AWS services for different tasks.
The two services we worked with directly during our initial AWS setup were Amazon S3 and Amazon DynamoDB.
Amazon S3 for transaction data
We used Amazon S3 to store our transaction datasets.
Instead of keeping the datasets only on our local computer, we created an S3 bucket and uploaded transaction files into it.
For example, our bucket follows a structure like:
datasets/
demo/
transactions.csv
We also tested the upload of a small synthetic transaction dataset to make sure the storage workflow was working correctly.
This was useful because S3 gives us a simple way to store CSV and other data files that can later be processed by our application.
Amazon DynamoDB for investigations
We used Amazon DynamoDB for storing investigation-related information.
The idea was to keep the original transaction files in S3 while storing the results of the investigation in DynamoDB.
For example, an investigation record can contain information such as:
- Investigation ID
- Dataset ID
- Account ID
- Risk score
- Risk level
- Recommended action
- Investigation status
- Detected signals
- Report location
- Created time
A sample investigation could look like:
{
"investigation_id": "INV-DEMO-001",
"dataset_id": "demo",
"account_id": "DEMO1001",
"risk_score": 0.86,
"risk_level": "HIGH",
"status": "OPEN"
}
This makes it easier to store and retrieve investigation results without putting the complete transaction dataset inside DynamoDB.
Planned serverless workflow
Our next step was to connect the AWS services with the AML processing workflow using a serverless architecture.
The planned flow is:
Transaction File
↓
Amazon S3
↓
AWS Lambda
↓
AML Analysis
↓
Risk Score
↓
Amazon DynamoDB
↓
Investigation Result
AWS Lambda can be used to process the uploaded file and trigger the AML analysis without maintaining a traditional server.
We used AWS SAM as the deployment approach for managing the serverless resources and preparing the application for deployment.
Why this architecture?
We wanted each service to have a clear responsibility.
Amazon S3 handles file storage.
Amazon DynamoDB handles investigation records.
AWS Lambda handles event-based processing.
AWS SAM helps manage the serverless deployment.
This separation makes the system easier to extend in the future.
For example, we can later add API Gateway for exposing backend APIs, CloudWatch for monitoring and logs, and Amazon SNS for sending notifications when a high-risk investigation is created.
What we learned
The AWS part of the project helped us understand how a machine learning application can be connected to cloud services.
One important thing we learned was that S3 should be used for storing large transaction files, while DynamoDB is better suited for structured investigation information.
We also learned that permissions and configuration are an important part of AWS. Setting up IAM access, deployment tools, and serverless resources requires careful configuration.
For beginners, the AWS console is a good way to understand the services first before moving to CLI and automated deployment.
Final architecture
Our overall idea is to combine our existing AML detection engine with AWS cloud services:
Frontend
↓
Backend API
↓
AML Detection Engine
↓
Machine Learning + Rules + Graph Analysis
↓
Risk Score
↓
Amazon S3 + Amazon DynamoDB
This gives us a foundation for building a scalable AML investigation platform.
Conclusion
Building this project with AWS helped us understand how cloud services can be used with AI and machine learning applications.
Amazon S3 gave us a simple and reliable way to store transaction datasets, while DynamoDB helped us manage investigation information.
The next stage is to complete the serverless workflow using AWS Lambda and SAM and connect the different components into one complete cloud-based AML pipeline.
Our goal is to make the system useful for AML analysts by reducing the time needed to find suspicious activity and providing clear information that can support human investigation.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article