Ensure logging is enabled for AWS CloudFront to track things like client IP addresses and access points.
Rationale
Logging tracks requests made through the CDN. With this information, you can detect changes in requests, complete security audits, and use other AWS tooling such as AWS WAF to block requests from certain IP addresses.
Once the S3 bucket location is returned, run get-distribution-config with your AWS CloudFront distribution ID to retrieve your distribution’s configuration information.
Create a new JSON file with the returned configuration. Enable logging and set an S3 bucket location (returned in step 1) to configure where the logs will be located. Save the file.