In today’s fast-paced digital financial world, transactions occur continuously, but not all are safe. Large or unusual transactions can indicate potential issues, ranging from simple errors to suspicious activity. If left unchecked, these can lead to financial losses or operational disruptions. Detecting such transactions in real time is essential for maintaining trust and security.
In this Cloud Lab, you will build a serverless, real-time transaction monitoring pipeline to detect suspicious activity using Amazon DynamoDB, SQS, Lambda, SNS, and API Gateway. The Cloud Lab begins by creating two DynamoDB tables, one to store user profile information for validation, and the second one to store all processed transactions along with alerts for suspicious activity. You’ll then configure the SQS FIFO queue to handle incoming transaction messages. An SNS topic will be set up to send alerts whenever a transaction is flagged as suspicious due to its amount exceeding a defined threshold.
The processing workflow is powered by two Lambda functions. The first Lambda, triggered by an HTTP API, ingests transaction requests, validates the input, and pushes them to the SQS queue. The second Lambda, triggered by SQS messages, evaluates the transaction amount, flags it as suspicious if it exceeds the threshold, stores the results in DynamoDB, and sends an SNS alert to notify the customer. Finally, you’ll use an HTTP API endpoint to submit transactions and trigger the pipeline from start to finish.
By the end of this Cloud Lab, you’ll have enough knowledge to build a robust serverless pipeline that processes transactions in real time, flags large transactions, and sends alerts automatically.
The following diagram illustrates the high-level architecture of the infrastructure you’ll build in this Cloud Lab: