Skip to content

AllowList

Source: src/AWS/Macie2/AllowList.ts

An Amazon Macie allow list — text patterns or predefined words that Macie ignores when it inspects S3 objects for sensitive data. Requires Macie to be enabled for the account (see Macie2.Session). Name, description, and criteria are all updatable in place; destroy deletes the list even if classification jobs reference it.

Regex allow list

const allowList = yield* Macie2.AllowList("InternalIds", {
description: "Internal ticket ids are not sensitive",
criteria: { regex: "TICKET-[0-9]{6}" },
});

Predefined words from S3

const allowList = yield* Macie2.AllowList("KnownTestData", {
criteria: {
s3WordsList: { bucketName: bucket.bucketName, objectKey: "words.txt" },
},
});