More Info:

Ensure that your AWS Cloudfront distributions have the Logging feature enabled in order to track all viewer requests for the content delivered through the Content Delivery Network (CDN).

Risk Level

Low

Address

Security

Compliance Standards

SOC2, HITRUST, NISTCSF, PCIDSS

Triage and Remediation

Remediation

To remediate the misconfiguration “Logging Should Be Enabled For CloudFront Distributions” for AWS using AWS console, follow the below steps:

  1. Login to the AWS Management Console and navigate to the CloudFront service.
  2. Click on the CloudFront distribution for which you want to enable logging.
  3. Click on the “Behaviors” tab and select the behavior for which you want to enable logging.
  4. Scroll down to the “Logging” section and click on “Edit”.
  5. Select “Yes” for “Enable Logging”.
  6. Choose the S3 bucket where you want to store the logs.
  7. Enter the prefix for the log files (optional).
  8. Click on “Yes, Edit” to save the changes.

Once you have completed the above steps, logging will be enabled for your CloudFront distribution and all the logs will be stored in the specified S3 bucket.

Additional Reading: