Create event types - Amazon Fraud Detector

Create event types

With Amazon Fraud Detector you generate fraud predictions for events. An event type defines the structure for an individual event sent to Amazon Fraud Detector. Once defined, you can build models and detectors that evaluate the risk for specific event types.

The structure of an event includes the following:

  • Entity Type: Classifies who is performing the event. During prediction, specify the entity type and entity Id to define who performed the event.

  • Variables: Defines what variables can be sent as part of the event. Variables are used by models and rules to evaluate fraud risk. Once added, variables cannot be removed from an event type.

  • Labels: Classifies an event as fraudulent or legitimate. Used during model training. Once added, labels cannot be removed form an event type.

For details on how to create an event type using the AWS Console see Step 1: Create event to evaluate for fraud.

Create an event type using the AWS SDK for Python (Boto3)

The following example shows a sample request for the PutEventType API. The example assumes you have created the variables ip_address and email_address, the labels legit and fraud, and the entity type sample_customer. For information about how to create these resources, see Create resources.

Note

You must first create variables, entity types, and labels prior to adding them to the event type.

import boto3 fraudDetector = boto3.client('frauddetector') fraudDetector.put_event_type ( name = 'sample_registration', eventVariables = ['ip_address', 'email_address'], labels = ['legit', 'fraud'], entityTypes = ['sample_customer'])