AI/ML based Card Payment Fraud Detection on AWS using replicated data from mainframe

Amazon Web Services
30 May 202415:34

Summary

TLDRこのビデオでは、AWS上でAIMLベースのカード詐欺検出ソリューションを構築する方法を紹介します。メインフレームシステム上で動くカード支払い承認アプリケーションは、静的なビジネスルールを使って取引を承認または拒否します。AWSにリアルタイムで詐欺スコアを生成するよう、Amazon Fraud DetectorサービスまたはSageMakerで構築されたAIMLモデルにリクエストを送信するようにアプリケーションを強化します。モデルは、過去48時間の顧客購入履歴や過去24時間の販売者売上履歴などの属性でトレーニングされ、推論時に同じ属性を通して最適なスコアを生成します。ソリューションアーキテクチャをレビューし、顧客がカードをスワイプまたはオンラインで購入を試みると、銀行はメインフレームシステム上で承認リクエストを受け取り、AWS上のプロセスがリレーショナルデータベースから顧客と販売者の履歴を取得し、AIMLスコアリングモデルに提供します。

Takeaways

  • 🚀 AWS上でAIMLベースのカード詐欺検出ソリューションを構築する方法が紹介されています。
  • 🛠️ メインフレームシステム上のカード支払い承認アプリケーションは、静的なビジネスルールを使用してトランザクションを承認または拒否します。
  • 🔄 レガシーアプリケーションは、AWSへのリアルタイム呼び出しを行い、Amazon Fraud DetectorサービスやSageMakerで構築された他のAIMLモデルによって詐欺スコアを生成するように強化されています。
  • 📈 モデルは、過去48時間の顧客の購入履歴や過去24時間の売主の売上履歴などの属性を使用してトレーニングされています。
  • 🔧 インファレンス時に、同じ属性がモデルに渡され、最適なスコアを生成します。
  • 🏢 ソリューションアーキテクチャでは、顧客がカードをターミナルでスワイプしたりオンラインで購入をした場合、銀行はメインフレームシステム上で承認リクエストを受け取り、AWSへのリアルタイム呼び出しを行います。
  • 🔑 AWS上で実行されているプロセスは、リレーショナルデータベースから顧客とマーチャントの履歴詳細を取得し、AIMLスコアリングモデルに提供します。
  • 📊 スコアが高いほど、詐欺の可能性のあるトランザクションを示します。メインフレームアプリケーションは、他のビジネスルールと組み合わせてトランザクションを承認または拒否する決定を行います。
  • 📚 詳細はメインフレームデータベースに挿入され、VSAM、DB2、またはIMSに記録されます。
  • 🔄 Precisely Publisherエージェントはメインフレーム上で動作し、ApplyエージェントはAmazon EC2インスタンス上で動作します。Applyエージェントは、Publisherエージェントから受信した生のデータベースログをコピーブックを使用してJSON形式に変換し、Amazon Managed Streaming for KafkaまたはMSKにメッセージを配信します。
  • 📈 MSKからのメッセージは、Kafka ConnectプロセスによってMSKから引き出し、RDSデータベースにライトされます。

Q & A

  • AWS上で構築されたカード詐欺検出ソリューションはどのような仕組みですか?

    -AWS上で構築されたカード詐欺検出ソリューションは、メインフレームシステム上で動作するカード支払い承認アプリケーションを強化し、静的なビジネスルールに加えてリアルタイムでAWSにアクセスして詐欺スコアを生成するAIMLモデルを活用しています。

  • AIMLモデルはどのようなデータを用いてトレーニングされていますか?

    -AIMLモデルは、例えば顧客の購入履歴(過去48時間の購入回数)や商人の販売履歴(過去24時間の報告された詐欺件数)などの属性を用いてトレーニングされています。

  • リアルタイムでのスコア生成において、どのような属性がモデルに渡されますか?

    -リアルタイムでのスコア生成においては、顧客と商人の履歴の詳細がモデルに渡され、最適なスコアを生成するのに使われます。

  • メインフレームアプリケーションはどのようにして取引を承認または拒否する決定を下しますか?

    -メインフレームアプリケーションは、AIMLスコアと他のビジネスルールを組み合わせて、取引を承認または拒否する決定を下します。

  • トランザクションの詳細はどこに記録されますか?

    -トランザクションの詳細はメインフレームデータベースに記録され、VSAM、DB2、またはIMSのいずれかになります。

  • Precisely Publisher AgentとApply Agentはどのように動作しますか?

    -Precisely Publisher Agentはメインフレーム上で動作し、データベースログを収集します。Apply AgentはAmazon EC2インスタンス上で動作し、Publisher Agentから受け取った生のデータベースログをJSONフォーマットに変換してAmazon Managed Streaming for KafkaまたはMSKに配信します。

  • Amazon S3にストリーミングされるデータはどのようにしてAIMLモデルに使われますか?

    -Amazon S3にストリーミングされるデータはオフラインでAIMLモデルのトレーニングに使われ、他の内部または外部データソースと共に分析とビジネスインテリジェンスに使用されます。

  • AWS CloudFormationテンプレートを使用して事前構築されたAWSリソースには何がありますか?

    -AWS CloudFormationテンプレートを使用して事前構築されたAWSリソースには、VPC、サブネット、IAMロール、AWS Key Management Serviceなどが含まれます。

  • メインフレームからのデータレプリケーションソフトウェアはどのように入手しますか?

    -AWS Marketplaceからメインフレームからのデータレプリケーションソフトウェアを入手します。Preciselyのデータレプリケーションソフトウェアを検索し、購読ボタンをクリックして購読を完了させます。

  • Amazon EC2インスタンスはどのように設定されますか?

    -Amazon EC2インスタンスは、AWS Marketplaceコンソールから起動し、作成したVPCとサブネットを選択します。また、セキュリティグループとIAMロールも設定し、ユーザーデータスクリプトを用いて必要なソフトウェアをインストールします。

  • メインフレームへの接続と認証にはどのような手順が必要ですか?

    -メインフレームへの接続と認証には、EC2インスタンスで作成された公開キーファイルをメインフレームにコピーし、デモン認証のためにキーファイルに追加する必要があります。

  • RDSポスターステーブルはどのように作成されますか?

    -RDSポスターステーブルは、psqlコマンドを使ってRDSデータベースに接続し、テーブルを作成コマンドを実行して作成されます。テーブルの列はVSAMコピーブックのフィールドに対応しています。

  • MSKからS3への配信とSNSへの統合はどのように設定されますか?

    -MSKからS3への配信とSNSへの統合は、Firehoseを使用して設定されます。Firehoseストリームを作成し、S3バケットを選択して配信先を設定します。EventBridgeパイプを使ってMSKからSNSにメッセージを配信することもできます。

  • Redshiftの生成SQLを使用して自然言語でクエリを実行する方法はどのようなものですか?

    -Redshiftの生成SQLでは、ノートブック内で自然言語でクエリを記述することができます。Redshiftは大規模な言語モデルを用いて、自然言語で記述されたクエリをSQLクエリに変換し、実行結果を提供します。

  • GitHubで詐欺検出セクションのコードサンプルを見ることができますか?

    -はい、GitHubにはビデオスクリプトに基づく詐欺検出セクションのコードサンプルがあります。

Outlines

00:00

🚀 AWS上でAIMLベースのカード詐欺検出ソリューションの構築

このビデオでは、AWS上でAIML(人工知能マシンラーニング)を使用してカード詐欺検出ソリューションを構築する方法を紹介します。メインフレームシステム上のカード支払い承認アプリケーションは、静的なビジネスルールを使って支払いを承認または拒否してきましたが、AWSにリアルタイムで詐欺スコアを求めるために機能が強化されました。このスコアは、Amazon Fraud DetectorサービスやSageMakerで構築された他のAIMLモデルによって生成されます。モデルは、過去48時間の顧客購入履歴や過去24時間の商人販売履歴などの属性でトレーニングされています。リアルタイムでのスコアの推定では、同じ属性がモデルに渡され、最適なスコアが生成されます。ソリューションアーキテクチャでは、顧客がカードをターミナルでスワイプしたりオンラインで購入を試みた際、銀行はメインフレームシステム上で承認リクエストを受け取り、AWSにリアルタイムでコールを行います。AWS上で動作するプロセスは、リレーショナルデータベースから顧客と商人の履歴詳細を取得し、AIMLスコアリングモデルに提供します。スコアが高いほど、取引が詐欺的である可能性が高くなります。メインフレームアプリケーションは、他のビジネスルールと組み合わせて取引を承認または拒否する決定を行います。詳細はメインフレームデータベースに挿入され、VSAM、DB2、またはIMSに記録されます。記録は、Precisely PublisherエージェントによってほぼリアルタイムでAWSに再適用されます。

05:01

🛠️ AWSリソースのセットアップとメインフレームとの統合

この段落では、AWS上でEC2インスタンスを設定し、メインフレームとの統合を行う手順が説明されています。まず、AWS Marketplaceからメインフレームデータレプリケーションソフトウェアを取得し、AWSコンソールからEC2インスタンスを起動します。インスタンスには、Kafka Poster、SQLクライアントなどの必要なソフトウェアがインストールされています。次に、Kafkaトピックを作成し、Precisely Publisherが記録をこのトピックに配信できるようにします。また、メインフレームへの接続に必要な公開鍵と秘密鍵を作成し、メインフレームにコピーする必要があります。メインフレーム上で、VSAMデータベースに記録を挿入し、Preciselyのデモンプロセスを使用してトピックに記録を配信します。RDSポスターデータベースにテーブルを作成し、そのテーブルに記録を挿入するためのLambda関数を作成します。これにより、メインフレームからAWSにデータを統合し、AIMLモデルのトレーニングに使用できるデータフローが構築されます。

10:03

🔧 MSK、S3、SNSを通じたデータパイプラインの設定

このセクションでは、AWSのMSK(Managed Streaming for Kafka)、S3(Simple Storage Service)、SNS(Simple Notification Service)を通じてデータパイプラインを設定する方法が解説されています。MSKクラスターを介してデータを受信し、S3にデータを配信するFirehoseストリームを作成します。さらに、EventBridgeパイプを使用して、MSKからSNSにデータをストリーミングし、メール通知を送信します。これらの設定により、リアルタイムのデータストリーミング、データの長期保存、分析のためのオフラインデータの使用が可能になります。また、Redshiftを使用して自然言語でクエリを実行し、ビジネスインサイトを引き出す方法も紹介されています。

15:04

📈 データ分析と詐欺検出モデルのトレーニング

最後の段落では、S3に蓄積されたデータを使ってAIMLモデルをトレーニングし、ビジネスインサイトを引き出す方法が説明されています。RedshiftのGenerative SQL機能を使って、自然言語でデータベースクエリを作成し、複雑なビジネス分析を実行できます。また、GitHubでサンプルコードを確認し、詐欺検出ソリューションの構築をさらに深めることもできます。このビデオでは、AWS上でAIMLを活用したカード詐欺検出ソリューションの構築とデータ分析の概要がわかりやすく説明されています。

Mindmap

Keywords

💡AIML

AIMLは「Artificial Intelligence Markup Language」の略で、人工知能を用いたマークアップ言語です。このビデオでは、AIMLを用いてカード詐欺検出ソリューションを構築しています。AIMLは、ビデオの主題であるAWS上で動作する詐欺検出サービスに密接に関係しており、リアルタイムでのカード支払いの承認・拒否に使用されます。

💡AWS

AWSは「Amazon Web Services」の略で、アマゾンが提供するクラウドコンピューティングプラットフォームです。ビデオではAWS上でAIMLベースのカード詐欺検出ソリューションを構築し、AWSの様々なサービスを活用してリアルタイムでのデータ取得や分析、詐欺スコアの生成を行うことを説明しています。

💡詐欺検出

詐欺検出は、不正な取引を検出し阻止するプロセスです。ビデオでは、AWS上で動作するAIMLモデルを使用してカード支払いの詐欺スコアを生成し、そのスコアに基づいて取引を承認または拒否するソリューションを構築しています。これはビデオの中心となるテーマであり、セキュリティとリスク管理に重要な役割を果たします。

💡リアルタイム

リアルタイムとは、即時に処理や応答が行われる技術的な概念です。ビデオではリアルタイムでの取引承認や詐欺スコアの生成について説明しており、これは迅速なリスク評価と取引管理に不可欠です。リアルタイムでのデータ取得と分析は、ビデオのソリューションアーキテクチャの重要な部分です。

💡メインフレーム

メインフレームは、大規模なデータ処理やトランザクション処理を行う高機能なコンピュータです。ビデオではメインフレームシステム上で動作するカード支払い承認アプリケーションからAWSへのリアルタイムコールを行って詐欺スコアを取得するプロセスを紹介しています。メインフレームは伝統的なビジネスルールに代わるものとして機能しており、ビデオのソリューションに重要な基盤を提供しています。

💡データベース

データベースは、構造化されたデータの集合を保存するシステムです。ビデオではリレーショナルデータベースから顧客と商人の履歴詳細を取得し、AIMLスコアリングモデルに提供するプロセスについて説明しています。データベースはビデオのソリューションアーキテクチャにおいて、重要な情報源として機能しています。

💡Amazon Fraud Detector

Amazon Fraud Detectorは、AWSが提供する詐欺検出サービスです。ビデオではこのサービスを使用して、顧客の購入履歴や商人の売上履歴などの属性を用いて詐欺スコアを生成しています。Amazon Fraud Detectorはビデオのソリューションの中で、詐欺検出の主要なツールとして機能しています。

💡SagMaker

SagMakerは、機械学習モデルを構築するためのAWSサービスです。ビデオではSagMakerを使用してAIMLモデルをトレーニングし、顧客の購入履歴や商人の売上履歴などのデータを用いて詐欺スコアを生成しています。SagMakerはビデオのソリューションにおいて、モデルのトレーニングと展開に重要な役割を果たしています。

💡データレプリケーション

データレプリケーションとは、データを複数の場所にコピーするプロセスです。ビデオではメインフレームからAWSへのデータレプリケーションについて説明しており、これはリアルタイムでのデータ分析と詐欺検出に必要なリアルタイムデータアクセスを実現します。データレプリケーションはビデオのソリューションアーキテクチャの重要な部分です。

💡Amazon S3

Amazon S3は、AWSが提供するストレージサービスです。ビデオではS3を使用してオフラインでのAIMLモデルのトレーニングと分析に使用されるデータを保存しています。Amazon S3はビデオのソリューションにおいて、データの長期保存とアクセスに重要な役割を果たしています。

Highlights

Building an AIML based card fraud detection solution on AWS.

Legacy card payment authorization application on z/OS mainframe system enhanced with real-time AWS calls.

Integration of Amazon Fraud Detector service or custom AI/ML models using SageMaker.

Model trained with customer and merchant history attributes for fraud score generation.

Solution architecture overview for card transaction authorization and fraud score retrieval.

Real-time data flow from mainframe to AWS for fraud score calculation.

Use of relational databases to store customer and merchant history details.

Fraud score indicating potential fraudulent transactions.

Combining business rules with fraud scores for transaction approval or decline.

Data replication from mainframe to AWS using Precisely Publisher and Apply agents.

Use of Amazon Managed Streaming for Kafka (MSK) for real-time data streaming.

Data consumption by various AWS services for analytics and business intelligence.

AWS CloudFormation template for creating pre-built resources like VPC, subnets, and IAM roles.

Setting up Amazon EC2 instance with Precisely software for data replication.

Replication of mainframe data to RDS PostgreSQL database using Lambda function.

Data streaming from MSK to Amazon S3 for offline model training and analytics.

Integration of Amazon EventBridge for streaming data to services like Amazon SNS for notifications.

Demonstration of capturing and replicating data online from VSAM databases.

Use of Generative SQL in Amazon Redshift for querying data using natural language.

Sample code for building the fraud detection solution available on GitHub.

Transcripts

play00:00

in this video we are going to show you

play00:01

how you can build an AIML based card

play00:03

fraud detection Solution on

play00:07

AWS in this use case the card payment

play00:10

authorization application is running on

play00:12

zos mainframe system and using static

play00:14

business rules to approve or decline the

play00:17

Legacy application is enhanced to make a

play00:19

real-time call to AWS to get a fraud

play00:21

score generated by Amazon fraud

play00:23

detection service or any other AIML

play00:25

model built using sag maker the model is

play00:28

trained with attributes such as as

play00:30

customer purchase history for example

play00:32

number of purchases in last 48 hours and

play00:34

Merchant sales history for example

play00:36

reported frauds in last 24 hours during

play00:39

inference of the score same attributes

play00:41

are passed to the model to generate

play00:42

optimal

play00:44

score let us review the solution

play00:47

architecture when a customer swipes a

play00:49

card at Terminal or makes an online

play00:51

purchase the bank will receive the

play00:53

authorization request on the mainframe

play00:54

system the application will make a

play00:57

real-time call to AWS the process

play00:59

running on AWS will get the customer and

play01:02

Merchant history details from relational

play01:04

database and provide to the AIML scoring

play01:06

model running on say Amazon fraud

play01:09

Detector service the model will return a

play01:11

score higher score will indicate

play01:13

potential fraudulent transaction the

play01:16

Mainframe application combining with the

play01:18

other business rule will make a decision

play01:20

to approve or decline the transaction

play01:23

detail is inserted on Mainframe database

play01:25

either vsam db2 or IMS the record will

play01:29

be captured and rep applicated to AWS

play01:31

near real time using precisely the

play01:33

precisely publisher agent is running on

play01:35

Mainframe and the apply agent is running

play01:37

on an Amazon ec2 instance the apply

play01:40

agent converts raw database logs

play01:42

received from publisher agent to Json

play01:44

format using the copy book and publishes

play01:46

the messages to Amazon managed streaming

play01:48

for cofco or msk several service will

play01:51

consume the message from msk a kovka

play01:54

connect process can pull the messages

play01:56

from msk and right to RDS database the

play01:59

history detail details are read from

play02:00

same database during the scoring process

play02:03

MSG will stream the messages to Amazon

play02:05

S3 using no code integration with fire

play02:08

hose the data on S3 will be used offline

play02:11

to train the AIML models along with

play02:13

other internal or external data sources

play02:16

for analytics and business intelligence

play02:18

the messages from msk can be pulled to

play02:20

Amazon red shift business users can run

play02:22

query against the database using natural

play02:25

language similarly other integration may

play02:28

be built using Amazon event Bridge pipe

play02:30

to stream data to services like Amazon

play02:32

SNS or pinpoint for notification and

play02:34

alerting in this demonstration there are

play02:37

several AWS resources created some of

play02:40

them are pre-built using cloud formation

play02:42

template this includes VPC subnets IAM

play02:46

roles AWS Key Management Service

play02:51

Etc on AWS console we can see there is a

play02:54

VPC created with three

play02:58

subnets PR private link end points are

play03:00

created for access to seress services

play03:03

such as secret manager STS event Bridge

play03:05

pipes

play03:10

Etc a msk cluster is defined in the VPC

play03:13

with three Brokers and three different

play03:18

subnets both I am and sasl a

play03:21

password-based authentication is

play03:24

enabled the credentials are stored in

play03:26

secret manager the bootstrap servers

play03:29

detail for both IM am and sasl

play03:31

authentication types are available in

play03:33

client

play03:38

information RDS posters database

play03:41

instance would DB name as card payments

play03:47

fraud a Lambda function is created to

play03:50

pull the messages from Ms and insert RDS

play03:52

posters

play03:56

database the function will be running in

play03:58

the same VPC

play04:01

the environment variables are set for

play04:03

RDS database connection

play04:07

details a SNS topic messages from msk

play04:10

will be streamed to SNS using an event

play04:12

Bridge pipe the SNS topic is configured

play04:15

to send email notification first we are

play04:17

going to obtain the Mainframe data

play04:19

replication software from Marketplace

play04:22

from AWS console search for

play04:26

Marketplace click discover products

play04:32

type AWS Mainframe migration with

play04:34

precisely on search

play04:36

bar click on data replication for IBM

play04:41

zos then click continue to subscribe

play04:44

button follow the instructions to

play04:46

complete subscription next we are going

play04:48

to set up the amazon ec2 instance once

play04:51

you have completed the subscription come

play04:53

back to AWS Marketplace console and

play04:55

click manage subscriptions then click

play04:58

launch new instance click continue to

play05:00

launch through

play05:04

ec2 provide a name for the ec2

play05:08

instance scroll down to network settings

play05:10

and click

play05:12

edit select the VPC created for this

play05:14

solution select one of the

play05:17

subnet click on select existing Security

play05:20

Group and from the drop down on common

play05:22

Security Group select the security group

play05:24

created for the

play05:26

solution expand the advanced details and

play05:29

click existing I am roll and select

play05:31

instance profile created by cloud

play05:36

formation paste the script in the user

play05:38

data text box the script first installs

play05:41

the required software such as Liber

play05:43

kofka poster SQL client Etc then it

play05:47

creates a Kafka folder downloads and

play05:49

extracts the Java Kafka libraries inside

play05:52

the Kafka Libs folder downloads the msk

play05:55

am jar file it creates an I am

play05:58

authentication client properties file

play06:00

the jar and the properties file are used

play06:02

by the javascripts runs the kofka topic

play06:05

script to create the kofka topic

play06:07

precisely publisher will publish the

play06:09

records to this topic then runs the

play06:12

kofka consumer group script to create a

play06:14

consumer group to be used later by the

play06:15

even Bridge pipe andc broker details

play06:18

have to be passed as one of the

play06:19

parameter for the scripts next it

play06:22

creates a precisely folder and then the

play06:24

sasl producer configuration file for

play06:27

precisely sets the path variable to

play06:29

include precisely B directory and runs

play06:31

the school key gen command to create the

play06:33

private and public key file for

play06:34

precisely the content of the public key

play06:37

file has to be copied to Mainframe and

play06:38

added in key file for demon for

play06:41

authentication click launch instance to

play06:43

launch a new ec2 instance with precisely

play06:45

software installed next click on the

play06:47

instance ID to open the details page for

play06:50

the ec2 created click the connect

play06:54

button type ec2 user for

play06:57

username then click connect

play07:02

this will open the ec2 command line the

play07:05

ec2 user data script created the public

play07:08

private key files for precisely the

play07:10

naacl directory contains the public key

play07:13

file to be copied to

play07:16

Mainframe the software agent folder

play07:18

contains software components to be

play07:20

installed on Mainframe is zip file a

play07:22

system administrator access is required

play07:24

to install the software log into the

play07:27

main frame in this use case we

play07:29

considered the card payments

play07:30

authorization history is stored in a

play07:32

vsam

play07:36

database the screen shows the Cobalt

play07:38

copy Book used to define the layout of

play07:40

the message the precisely software is

play07:43

already installed and UI is available

play07:45

using the ispf panel to perform admin

play07:49

works the demon process in the publisher

play07:52

is already created in started as a batch

play07:55

job in this demonstration the demon job

play07:58

is running on Port 90 5 DD name sqd off

play08:02

refers the keys file the content of the

play08:04

public key file created within the ec2

play08:07

instance is pasted in this file and will

play08:09

be used to authenticate the apply engine

play08:11

when connection request is

play08:13

made here's the publisher

play08:16

job from the ispf panel for precisely

play08:19

select option

play08:21

three vssm to msk is the name of the

play08:24

publisher engine and the configuration

play08:26

is stored in cab mentioned the screen

play08:28

shows the stats such as records captured

play08:31

records published The Source log stream

play08:33

shows the log stream name configured to

play08:35

Stage the database changes in our

play08:38

scenario the log stream is a vsam based

play08:40

file but in production coupling facility

play08:43

based log stream is

play08:45

recommended One Source object is

play08:47

configured which is identified by vsam

play08:49

pure C this will capture the logs from

play08:52

the card payments authorization V Sam

play08:54

file switch back to ec2 command prompt

play08:58

we will create the RDS posters table

play09:01

connect to the RDS database using the

play09:03

psql

play09:04

command then run the create table

play09:07

command the table columns corresponds to

play09:09

the fields in the vsam copy book run a

play09:12

select query to validate the table next

play09:15

create a cpy subfolder inside precisely

play09:17

folder create a file named cardor

play09:20

payments and paste the Cobalt copybook

play09:23

layout save the copy book

play09:27

file create the apply engine script file

play09:29

named script.

play09:32

sqd The Script has the job name vs Sam

play09:34

to msk is identifier the description

play09:37

section refers to metadata referring to

play09:40

the Cobalt copybook location the Sam

play09:42

perk is the name of source object

play09:44

identifier set by publisher Source data

play09:47

store points to Mainframe IP address and

play09:49

port for demon on Mainframe vssm to msk

play09:52

is the publisher name vam CDC is data

play09:55

source

play09:57

type Target data store points to topic

play10:00

name of the msk messages will be

play10:02

distributed to kofka partitions using

play10:04

key Json is the record format both

play10:07

source and Target data source use cardor

play10:10

payment SRC to describe the message

play10:13

metadata the script used the replicate

play10:15

function to convert raw ebcc log to Json

play10:18

format with key fields from

play10:22

copybook next we are going to set up the

play10:24

msk S3 delivery via fire hose and

play10:27

integration with SNS via event Bridge

play10:29

pipe

play10:30

MSG provides no code integration with

play10:32

various AWS services on the MSG S3

play10:35

delivery tab click create fire hose

play10:38

stream some of the details are

play10:41

pre-populated such as Source destination

play10:43

msk

play10:45

cluster paste the topic

play10:47

name enter a name for the

play10:51

stream select the S3 bucket created by

play10:54

cloud formation template

play10:59

add

play11:00

prefixes click create fire host stream

play11:03

to

play11:04

create once the creation is complete you

play11:06

will see the status is

play11:09

active next click integration Tab and

play11:12

then click connect Amazon msk cluster to

play11:14

pipe enter a pipe

play11:17

name paste the topic name in the

play11:20

consumer group created

play11:23

earlier for demonstration we are not

play11:25

adding any filtering or enrichment

play11:29

on the target page click in Target

play11:31

service dropdown you can see the

play11:34

different Services you can integrate

play11:35

with select SNS then the topic expand

play11:39

Target input Transformer on the sample

play11:41

event select msk click on the value to

play11:44

select the field for output click create

play11:47

pipe to create the event Bridge pipe

play11:49

once successfully created the status

play11:51

will show is running now let's start the

play11:54

apply engine and insert some record in

play11:55

the vsam database on the ec2 command

play11:59

prompt start the apply engine using the

play12:01

sqdg command the process displays

play12:04

valuable information about the data

play12:05

sources and message layouts it's

play12:08

connected to publisher engine on

play12:09

Mainframe and waiting for data

play12:12

now switch to Mainframe this PS file

play12:16

contains records that will be inserted

play12:17

to the vsam database the records map to

play12:20

the layout of the copy book we saw

play12:22

earlier in this demonstration we will

play12:24

use the precisely batched differ

play12:26

functionality to replicate data online

play12:29

Sam or db2 IMS follow the same capture

play12:32

publisher architecture with some

play12:33

differences in setup and

play12:35

configurations we are going to use the

play12:37

job to copy the PS file to the current V

play12:39

Sam and then run the sqd DFC DC utility

play12:43

the utility compares the base and

play12:44

current files and updates the change

play12:46

records in the log stream submit the

play12:50

job switching to the ispf panel we see

play12:53

the engine is connected now the capture

play12:55

and publish record counts have gone up

play12:59

ec2 command prompt also shows records

play13:02

ingested let's switch to another

play13:04

terminal and let's run the select query

play13:06

on RDS posters again we see the records

play13:08

in the

play13:10

table the metrics on Lambda console

play13:12

shows the invocations it picked up the

play13:15

messages from msk and inserted them to

play13:17

RDS let's look at the other data

play13:20

pipelines created from msk on S3 console

play13:23

let's navigate to data folder and then

play13:25

to the subfolders select one object and

play13:28

click query with S3 select on the page

play13:31

select Json as input and output format

play13:34

then run SQL query we see the Json

play13:37

message that was published to MSG by

play13:39

precisely apply agent the change

play13:41

operation is an insert in this case you

play13:44

will denote an update and D delete

play13:46

operation after image contains the new

play13:48

values of the key Fields corresponding

play13:50

to copybook fields and their respective

play13:52

values an update database operation will

play13:54

have both before and after image the

play13:57

object stored in S3 will be aggreg ated

play13:59

and used offline to train and update the

play14:01

AIML

play14:03

models the even Bridge pipe also

play14:06

consumed the messages and sent email

play14:08

notification with the Json messages body

play14:10

here's a sample

play14:12

email now let's experiment how we can

play14:14

use generative SQL from Red shift to

play14:16

query using natural language on the red

play14:19

shift console page click on query data

play14:22

click on plus sign and select notebook

play14:25

select the cluster run SQL to create

play14:28

schema directly from the msk topic and

play14:31

then a materialized view with the data

play14:33

from the

play14:35

topic then click on generative SQL a

play14:38

chatbot window is opened on right hand

play14:40

side type in plain language for example

play14:43

show top five states by purchase Amazon

play14:45

qbed by large language model or llm

play14:48

generates the SQL query to be executed

play14:51

click add to notebook and then click run

play14:53

we see the SQL

play14:56

results let's try something little

play14:58

complex

play14:59

let's ask show top five Merchants with

play15:01

highest single purchase ask to include

play15:04

state of purchase and output also ask to

play15:06

show the purchase amount in currency

play15:08

format using generative AI red shift is

play15:11

able to understand the request written

play15:13

in natural language search the database

play15:15

and generate the SQL you can do lot more

play15:18

ask complex business Insight on the data

play15:21

here's the

play15:22

result in case you are looking for the

play15:24

code sample to build the fraud detection

play15:26

section check the sample code in GitHub

play15:30

thanks for watching

Rate This

5.0 / 5 (0 votes)

相关标签
AWSAIML詐欺検知カード決済リアルタイムデータ分析ビジネスルールメインフレームクラウドコンピューティングSaaS
您是否需要英文摘要?