β Repository β π Compliance Engine β π CloudAware β π AWS β π GuardDuty
π‘οΈ AWS GuardDuty is not enabled in all regionsπ’
- Contextual name: π‘οΈ GuardDuty is not enabled in all regionsπ’
- ID:
/ce/ca/aws/guardduty/detector-not-enabled-in-all-regions
- Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY
- Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- AWS Security Hub: [GuardDuty.1] GuardDuty should be enabled
Descriptionβ
Descriptionβ
This policy identifies whether AWS GuardDuty is enabled in all active AWS regions for an account.
AWS GuardDuty is a threat detection service that continuously monitors AWS accounts and workloads for malicious or unauthorized activity, providing detailed security findings to support timely remediation.
Rationaleβ
Enabling GuardDuty in all regions is a security best practice. Adversaries may exploit unused or unmonitored regions to launch resources or conduct malicious activities undetected. Enabling GuardDuty across all regions ensures comprehensive visibility and consistent threat detection, reducing the risk of security blind spots.
Impactβ
If GuardDuty is not enabled in all regions, critical security findingsβsuch as indicators of unauthorized access, compromised instances, or reconnaissance attempts, may be missed in unmonitored regions. This can delay incident response and increase the impact of potential breaches.
Enabling GuardDuty in all regions incurs costs based on the volume of AWS CloudTrail events, VPC Flow Logs, and DNS query logs analyzed.
... see more
Remediationβ
Remediationβ
Enable GuardDuty in a Regionβ
From Command Lineβ
o enable GuardDuty in a specific region, run the following command, replacing
{{region}}
with the target region:aws guardduty create-detector --enable --region {{region}}
To enable GuardDuty in all available AWS regions, you can use the following shell script:
#!/bin/bash
for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
echo "Checking GuardDuty in region: $region"
DETECTOR_ID=$(aws guardduty list-detectors --region $region --query "DetectorIds[0]" --output text)
if [ "$DETECTOR_ID" == "None" ] || [ -z "$DETECTOR_ID" ]; then
echo "GuardDuty not found in $region. Enabling..."
aws guardduty create-detector --enable --region $region
if [ $? -eq 0 ]; then
echo "Successfully enabled GuardDuty in $region."
else
echo "Failed to enable GuardDuty in $region."
fi
else
echo "GuardDuty is already enabled in $region with Detector ID: $DETECTOR_ID"... see more