Skip to content

Commit b45d265

Browse files
committed
Enable S3 Publish Destination
1 parent b3b992a commit b45d265

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/configure_guardduty_admin_account.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ for r in $REGIONS ; do
2121
echo "Detector $DETECTOR in $r"
2222
aws guardduty update-organization-configuration --detector-id $DETECTOR --auto-enable --region $r
2323
aws guardduty create-members --detector-id $DETECTOR --account-details file://ACCOUNT_INFO.txt --region $r
24+
25+
# Adding this line because the Original create-detector command doesn't seem to set it
26+
aws guardduty update-detector --detector-id $DETECTOR --finding-publishing-frequency FIFTEEN_MINUTES --region $r
27+
28+
BUCKET=$1
29+
KMS_KEY=$2
30+
if [[ ! -z "$KMS_KEY" ]] ; then
31+
aws guardduty create-publishing-destination --detector-id $DETECTOR --destination-type S3 --destination-properties DestinationArn=$BUCKET,KmsKeyArn=$KMS_KEY --region $r
32+
fi
33+
2434
done
2535

2636
# cleanup

0 commit comments

Comments
 (0)