Architecture overview

Deploying this solution with the default parameters builds the following environment in the AWS Cloud.

architecture of model training

Figure 1:architecture of construct graph data, model training and model deployment

architecture of real-time inference and business dashboard

Figure 2:architecture of real-time fraud detection and business monitor system

This solution deploys five AWS CloudFormation templates in your AWS account and sets up the following:

  1. The first AWS CloudFormation template realtime-fraud-detection-with-gnn-on-dgl creates:
  2. The second CloudFormation template starting with realtime-fraud-detection-with-gnn-on-dgl-trainingNestedStack creates:
    • an AWS Step Functions workflow pipeline trains the model from tabular finance trasaction dataset, then deploy the online infernce endpoint.
    • AWS Glue data catalog and ETL job are used transforming the original tabular data to graph structure data.
    • Amazon ECS on AWS Fargate import the graph data into graph database Amazon Neptune.
    • Amazon SageMaker trains model and deploy the online inference endpoint.
    • AWS Lambda functions implement raw data ingesting, post-processing after model training and other glue work.
  3. The third CloudFormation template starting with realtime-fraud-detection-with-gnn-on-dgl-inferenceNestedStack creates:
    • AWS Lambda function implements the real-time fraud detection endpoint.
  4. The fourth CloudFormation tempalte starting with realtime-fraud-detection-with-gnn-on-dgl-dashboardNestedStack creates:
  5. The fifth CloudFormation template starting with realtime-fraud-detection-with-gnn-on-dgl-DashboardDatabaseRotation creates:
    • AWS Lambda function will periodically rotate the user credential of DocumentDB stored in Secrets Manager.

For redundancy, the Amazon VPCs are created with subnets in two Availability Zones (AZs) for high availability. The NAT gateway, Amazon Neptune, Amazon DocumentDB, AWS Glue and other AWS resources are deployed across these two AZs.

NOTE: AWS CloudFormation resources are created from AWS Cloud Development Kit (CDK) (AWS CDK) constructs.