Skip to content

DetectorVersion

Source: src/AWS/FraudDetector/DetectorVersion.ts

An Amazon Fraud Detector detector version — the deployable revision of a detector. It bundles a set of rules (owned inline here) over the detector’s event type and, when ACTIVE, serves real-time predictions via getEventPrediction. Rules and the version are cheap, rule-based configuration objects — no model training is involved.

const version = yield* FraudDetector.DetectorVersion("v1", {
detectorId: detector.detectorId,
status: "ACTIVE",
ruleExecutionMode: "FIRST_MATCHED",
rules: [
{
ruleId: "high_risk",
expression: '$email == "fraud@example.com"',
outcomes: ["review"],
},
],
});