Skip to content

IPSet

Source: src/AWS/GuardDuty/IPSet.ts

A GuardDuty trusted IP set — an S3-hosted list of IP addresses GuardDuty treats as trusted, suppressing findings for traffic from them. The list file must exist in S3 before activation; name, location, and activation are updatable in place, while format changes replace the set.

Trust the office IP range

const detector = yield* AWS.GuardDuty.Detector("Detector", {});
const ipSet = yield* AWS.GuardDuty.IPSet("OfficeIPs", {
detectorId: detector.detectorId,
format: "TXT",
location: "https://s3.amazonaws.com/my-security-bucket/office-ips.txt",
});

Stage a list without activating it

const ipSet = yield* AWS.GuardDuty.IPSet("StagedIPs", {
detectorId: detector.detectorId,
format: "TXT",
location: "https://s3.amazonaws.com/my-security-bucket/staged.txt",
activate: false,
});