Skip to content

Instantly share code, notes, and snippets.

@bashtoni
Created December 20, 2017 22:02
Show Gist options
  • Save bashtoni/bf2711f5abe3e8f073bac66009294705 to your computer and use it in GitHub Desktop.
Save bashtoni/bf2711f5abe3e8f073bac66009294705 to your computer and use it in GitHub Desktop.
See all GuardDuty alerts
for detectorid in $(aws guardduty list-detectors --query DetectorIds[] --output text); do
aws guardduty get-findings --detector-id $detectorid \
--finding-ids $(aws guardduty list-findings --detector-id $detectorid --query FindingIds --output text) \
--query 'Findings[*].[Resource.InstanceDetails.InstanceId,Type,Service.Count]' --output text
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment