Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
cloudfront_distributions_logging_enabledProvider: AWS
Service:
cloudfrontSeverity: MEDIUM
Categories:
loggingResource type:
AwsCloudFrontDistributionWhat this check verifies
CloudFront distributions record viewer requests using standard access logs (S3), real-time log configurations, or Standard Logging v2 via CloudWatch Logs delivery sources. The finding evaluates whether at least one logging mechanism is active so request metadata is captured for each distribution.Risk
Missing CloudFront logs blinds monitoring of edge requests, impeding detection of bot abuse, credential stuffing, and cache-bypass attempts. This delays incident response and weakens forensic evidence. A delivery source without an active delivery does not count as enabled.Recommendation
Enable standard access logs or real-time logs for all distributions. Apply least privilege to log storage, enforce retention and immutability, and centralize ingestion with alerts. Use defense-in-depth: correlate with WAF metrics, sample real-time when needed, and audit new distributions for logging.Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws cloudfront get-distribution-config —id <DISTRIBUTION_ID> —output json > current-config.json && echo ‘Manually edit current-config.json to add Logging.Bucket: <example_bucket>.s3.amazonaws.com’, then run:’ && echo ‘aws cloudfront update-distribution —id <DISTRIBUTION_ID> —distribution-config file://current-config.json —if-match $(aws cloudfront get-distribution-config —id <DISTRIBUTION_ID> —query “ETag” —output text)’
References
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html
- https://repost.aws/knowledge-center/cloudfront-logging-requests
- https://aws.amazon.com/awstv/watch/e895e7811ac/
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/CloudFront/enable-real-time-logging.html
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = cloudfront_distributions_logging_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks