π‘οΈ 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 AWS 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β
To 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
set -e
REGIONS=$(aws ec2 describe-regions --query "Regions[].RegionName" --output text)
if [ -z "$REGIONS" ]; then
echo "Error: Unable to retrieve AWS regions"
exit 1
fi
for region in $REGIONS; do
echo "Checking GuardDuty in region: $region"
# Get detector ID for the 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..."
if aws guardduty create-detector --enable --region "$region"; then... see more