Skip to content

Commit

Permalink
Enable S3 Publish Destination
Browse files Browse the repository at this point in the history
  • Loading branch information
jchrisfarris committed Jul 20, 2024
1 parent b3b992a commit b45d265
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/configure_guardduty_admin_account.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ for r in $REGIONS ; do
echo "Detector $DETECTOR in $r"
aws guardduty update-organization-configuration --detector-id $DETECTOR --auto-enable --region $r
aws guardduty create-members --detector-id $DETECTOR --account-details file://ACCOUNT_INFO.txt --region $r

# Adding this line because the Original create-detector command doesn't seem to set it
aws guardduty update-detector --detector-id $DETECTOR --finding-publishing-frequency FIFTEEN_MINUTES --region $r

BUCKET=$1
KMS_KEY=$2
if [[ ! -z "$KMS_KEY" ]] ; then
aws guardduty create-publishing-destination --detector-id $DETECTOR --destination-type S3 --destination-properties DestinationArn=$BUCKET,KmsKeyArn=$KMS_KEY --region $r
fi

done

# cleanup
Expand Down

0 comments on commit b45d265

Please sign in to comment.