Skip to content

Detector

Source: src/AWS/GuardDuty/Detector.ts

A GuardDuty detector — the account/region singleton that enables Amazon GuardDuty threat detection. Only one detector can exist per region, so this resource is a capture-and-restore singleton: adopting a pre-existing detector that Alchemy did not create requires --adopt.

Enable with default settings

const detector = yield* GuardDuty.Detector("Detector", {});

Frequent finding publishing

const detector = yield* GuardDuty.Detector("Detector", {
enable: true,
findingPublishingFrequency: "FIFTEEN_MINUTES",
tags: { team: "security" },
});