Home / AWS

AWSCheat sheetBeginner

GuardDuty findings triage cheat sheet: list, filter, archive and suppress noise from the CLI

CLI commands for daily GuardDuty triage. Count findings by severity, list the ones that matter, read the key fields, archive what you've checked, add narrow suppression rules and alert on High severity.

Deepak Bhardwaj6 min read

Applies toAmazon GuardDuty (single account and delegated administrator in AWS Organizations), AWS CLI v2, Amazon EventBridge

Goal

You open GuardDuty and see hundreds of findings. Most are known noise, a few matter, and nobody knows which have already been checked. This cheat sheet covers the CLI commands for a daily triage loop: count, list, read, act, archive, and suppress what you've confirmed is harmless.

All commands need the detector ID for the Region. GuardDuty is regional, so repeat them in each Region you use.

export AWS_REGION=eu-west-1
DET=$(aws guardduty list-detectors --query 'DetectorIds[0]' --output text)
echo "$DET"

If you run this from the GuardDuty delegated administrator account, the same commands return findings for every member account.

Severity levels

Level Range What to do
Critical 9.0–10.0 Treat it as an incident. Often an attack sequence that links several signals
High 7.0–8.9 Investigate the same day. The resource is probably compromised
Medium 4.0–6.9 Review this week. Suspicious activity or a risky configuration
Low 1.0–3.9 Usually blocked or low impact. Look for trends

One finding type can have a different severity depending on context, so filter by the number, not by type.

Count what you have

aws guardduty get-findings-statistics --detector-id "$DET" \
  --finding-statistic-types COUNT_BY_SEVERITY \
  --finding-criteria '{"Criterion":{"service.archived":{"Equals":["false"]}}}'

The output maps each severity value to a count of active findings. Newer CLI versions also support grouping statistics by account, resource or finding type. Check aws guardduty get-findings-statistics help in your build.

List findings that matter

Active (not archived) findings at High or above, highest first:

aws guardduty list-findings --detector-id "$DET" \
  --finding-criteria '{"Criterion":{"severity":{"GreaterThanOrEqual":7},"service.archived":{"Equals":["false"]}}}' \
  --sort-criteria AttributeName=severity,OrderBy=DESC \
  --max-items 50 --query 'FindingIds' --output text

Useful criteria to combine:

Criterion key Example Use
severity {"GreaterThanOrEqual":7} Only High and Critical
service.archived {"Equals":["false"]} Hide what you've already checked
type {"Equals":["UnauthorizedAccess:EC2/SSHBruteForce"]} One finding type
accountId {"Equals":["111122223333"]} One member account
resource.instanceDetails.instanceId {"Equals":["i-0abc123def4567890"]} Everything about one instance
resource.accessKeyDetails.userName {"Equals":["ci-deploy"]} Everything about one IAM user or role
updatedAt {"GreaterThanOrEqual":1763424000000} Updated since a time (epoch milliseconds)

Epoch milliseconds for "24 hours ago" on Linux: echo $(( ($(date +%s) - 86400) * 1000 )).

Read findings in a table

get-findings takes up to 50 IDs per call.

IDS=$(aws guardduty list-findings --detector-id "$DET" \
  --finding-criteria '{"Criterion":{"severity":{"GreaterThanOrEqual":7},"service.archived":{"Equals":["false"]}}}' \
  --max-items 50 --query 'FindingIds' --output text)

aws guardduty get-findings --detector-id "$DET" --finding-ids $IDS \
  --query 'Findings[].{sev:Severity, type:Type, account:AccountId, resource:Resource.ResourceType, instance:Resource.InstanceDetails.InstanceId, principal:Resource.AccessKeyDetails.UserName, count:Service.Count, last:Service.EventLastSeen}' \
  --output table

For one finding, read Title, Description and Service.Action in full. Service.Action holds the remote IP, port, API call or DNS name that set it off:

aws guardduty get-findings --detector-id "$DET" --finding-ids <finding-id> \
  --query 'Findings[0].{title:Title, desc:Description, action:Service.Action, first:Service.EventFirstSeen}'

Common finding types and the first move

Finding type (examples) Likely cause First move
Recon:EC2/PortProbeUnprotectedPort Internet scanners hitting an open port Close the port in the security group. Archive if the port must stay open
UnauthorizedAccess:EC2/SSHBruteForce, RDPBruteForce Password guessing on port 22 or 3389 Remove the public rule. Use Session Manager or EC2 Instance Connect Endpoint
CryptoCurrency:EC2/BitcoinTool.B!DNS Mining software on the instance Treat it as compromised. Isolate it and take snapshots before you change anything
UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS Instance role credentials used from outside AWS Revoke the role's active sessions and find how the credentials were exposed
Stealth:IAMUser/CloudTrailLoggingDisabled Someone stopped or deleted a trail Turn the trail back on. Check who made the call in CloudTrail
Policy:S3/BucketBlockPublicAccessDisabled Block Public Access turned off on a bucket Confirm it was intended. If not, turn it back on

Caution

For a High or Critical finding on an instance, don't terminate or reboot it first. You lose memory and disk evidence. Isolate it with a security group that has no rules, snapshot its volumes, then investigate.

Archive what you've checked

Archiving hides a finding from the default view but keeps it. If the activity happens again, GuardDuty updates the archived finding rather than creating a new one, so check suppressed findings from time to time.

aws guardduty archive-findings --detector-id "$DET" --finding-ids <id1> <id2>

# Bring one back
aws guardduty unarchive-findings --detector-id "$DET" --finding-ids <id1>

Suppression rules for known noise

A suppression rule is a saved filter with --action ARCHIVE. It archives matching findings automatically as they arrive. Keep each rule narrow: one finding type plus a specific resource, tag or IP.

# Vulnerability scanner probing the web tier is expected
aws guardduty create-filter --detector-id "$DET" \
  --name suppress-portprobe-web-tier --action ARCHIVE --rank 1 \
  --description "Known internet scans on public ALB-fronted web tier" \
  --finding-criteria '{"Criterion":{
      "type":{"Equals":["Recon:EC2/PortProbeUnprotectedPort"]},
      "resource.instanceDetails.tags.value":{"Equals":["web-public"]}}}'

aws guardduty list-filters --detector-id "$DET"
aws guardduty get-filter --detector-id "$DET" --filter-name suppress-portprobe-web-tier
aws guardduty delete-filter --detector-id "$DET" --filter-name suppress-portprobe-web-tier

Warning

Never suppress a whole finding type or a severity band across all resources. A rule like "archive all UnauthorizedAccess:*" hides the attack you deployed GuardDuty to catch. In an organisation, create suppression rules in the delegated administrator account so they apply to member findings.

If your own scanner or penetration test IPs cause the noise, add them to a trusted IP list instead. GuardDuty does not generate VPC Flow Log or DNS findings for traffic from trusted IPs:

aws guardduty create-ip-set --detector-id "$DET" --name trusted-scanners \
  --format TXT --location https://my-sec-bucket.s3.amazonaws.com/guardduty/trusted.txt --activate

Test the pipeline with sample findings

Sample findings have [SAMPLE] in the title. Use them to test alert routing, then archive them.

aws guardduty create-sample-findings --detector-id "$DET" \
  --finding-types "UnauthorizedAccess:EC2/SSHBruteForce"

Prevent it next time

Alert on High and Critical findings through EventBridge so nobody has to check the console:

aws events put-rule --name guardduty-high \
  --event-pattern '{"source":["aws.guardduty"],"detail-type":["GuardDuty Finding"],"detail":{"severity":[{"numeric":[">=",7]}]}}'

aws events put-targets --rule guardduty-high \
  --targets Id=sns,Arn=arn:aws:sns:eu-west-1:111122223333:security-alerts

The SNS topic's access policy must allow events.amazonaws.com to publish.

  • Shorten how often updates to existing findings are sent: aws guardduty update-detector --detector-id "$DET" --finding-publishing-frequency FIFTEEN_MINUTES. New findings are sent within minutes whatever this is set to.
  • Export findings to S3 with create-publishing-destination so you keep them for longer than GuardDuty's retention period. Check the current retention period in the documentation.
  • Review suppression rules every quarter. Delete any rule whose resource or tag no longer exists.
  • Give each finding an owner and a deadline based on its severity. Archive only after someone has written down what they checked.