Amazon Macie uses machine learning to discover and protect sensitive data in S3. It detects PII, credentials, and financial data. Attackers can disable Macie with a single API call, delete custom data identifiers, and suppress findings.
Macie scans S3 objects to find PII (SSNs, credit cards, passport numbers), credentials (API keys, private keys), and financial data. It is the only AWS service that examines actual object content for hardcoded secrets and sensitive data.
Classification jobs scan S3 buckets on schedule or one-time. Custom data identifiers extend detection with regex patterns for organization-specific data. Jobs can be paused, cancelled, or deleted by an attacker to stop ongoing detection.
Findings report sensitive data locations and policy violations. Suppression rules automatically archive matching findings. Without org delegated admin, member accounts can disable Macie independently. Macie is not enabled by default.
Macie can be disabled with a single API call (disable-macie). It is region-scoped and not enabled by default, meaning many accounts have never run it. Findings can be suppressed silently and custom data identifiers deleted.
aws macie2 get-macie-sessionaws macie2 describe-bucketsaws macie2 list-findings \
--finding-criteria '{"criterion":{"category":{"eq":["CLASSIFICATION"]}}}'aws macie2 list-classification-jobsaws macie2 list-custom-data-identifiersaws macie2 disable-macieaws macie2 delete-custom-data-identifier \
--id cdi-abc123def456aws macie2 create-findings-filter \
--name "SuppressAll" \
--action ARCHIVE \
--finding-criteria '{"criterion":{"category":{"eq":["CLASSIFICATION"]}}}'aws macie2 update-classification-job \
--job-id job-abc123 \
--job-status USER_PAUSEDaws macie2 list-findings --finding-criteria '{"criterion":{"type":{"eq":["SensitiveData:S3Object/Credentials"]}}}' --query 'findingIds' --output text | xargs -I {} aws macie2 get-findings --finding-ids {}aws macie2 disassociate-from-administrator-account{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "macie2:*",
"Resource": "*"
}]
}Full Macie access allows disabling the service, deleting data identifiers, and creating suppression rules
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"macie2:Get*",
"macie2:List*",
"macie2:Describe*"
],
"Resource": "*"
}]
}Read-only access for security teams to review findings without modification rights
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"macie2:CreateFindingsFilter",
"macie2:UpdateFindingsFilter",
"macie2:DeleteCustomDataIdentifier",
"macie2:UpdateClassificationJob"
],
"Resource": "*"
}]
}Can create suppression rules, delete custom identifiers, and pause classification jobs to hide sensitive data findings
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "PreventMacieDisable",
"Effect": "Deny",
"Action": [
"macie2:DisableMacie",
"macie2:DisassociateFromAdministratorAccount",
"macie2:DeleteCustomDataIdentifier"
],
"Resource": "*"
}]
}Organization SCP prevents member accounts from disabling Macie or removing custom detection patterns
Centralize Macie management so member accounts cannot disable it independently.
aws macie2 enable-organization-admin-account \
--admin-account-id 123456789012Use SCPs to deny DisableMacie and DisassociateFromAdministratorAccount in all member accounts.
Send Macie findings to Security Hub so they persist independently and feed into centralized monitoring.
Macie is regional. Enable it in every region where S3 buckets exist to avoid blind spots.
for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
aws macie2 enable-macie --region $region 2>/dev/null
doneAlert on DisableMacie, DeleteCustomDataIdentifier, and CreateFindingsFilter CloudTrail events.
Ensure the S3 bucket storing Macie classification results has proper access controls and encryption.
aws s3api put-public-access-block \
--bucket macie-results-bucket \
--public-access-block-configuration \
BlockPublicAcls=true,IgnorePublicAcls=true,\
BlockPublicPolicy=true,RestrictPublicBuckets=trueAWS Macie Security Card • Toc Consulting
Always obtain proper authorization before testing