π AWS CloudFront Distribution Logging is not enabled π’
- Contextual name: π Distribution Logging is not enabled π’
- ID:
/ce/ca/aws/cloudfront/distribution-logging
- Located in: π AWS CloudFront
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
RELIABILITY
Similar Policiesβ
- AWS Security Hub
- [[CloudFront.5] CloudFront distributions should have logging enabled]([CloudFront.5] CloudFront distributions should have logging enabled (https://docs.aws.amazon.com/securityhub/latest/userguide/cloudfront-controls.html#cloudfront-5)]
- Internal
dec-x-a5c2acfe
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-a5c2acfe | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
This policy checks if standard logging is enabled for AWS CloudFront Distributions.
Standard logging supports:
- Delivery of access logs to Amazon CloudWatch Logs, Amazon Kinesis Data Firehose, and Amazon S3.
- Selection of specific log fields, including a subset of realβtime log fields.
- Configuration of additional output log file formats.
Rationaleβ
Standard logs provide details for each distribution request (e.g., the viewerβs IP address, requested path and object, HTTP status code and method, timestamp, and user agent) enabling monitoring, troubleshooting, and security auditing.
Impactβ
Enabling standard logging may increase charges for log storage and data transfer.
Auditβ
This policy flags an AWS CloudFront Web Distribution as
INCOMPLIANT
if theLogging Enabled
checkbox is false.
Remediationβ
Remediationβ
Permissionsβ
CloudFront delivers access logs via the CloudWatch vended logs. To enable and configure log delivery, you must have IAM permissions for the target logging service and for CloudWatch Logs delivery actions.
From Command Lineβ
Enable Standard Logging Using CloudWatch APIβ
- Create a delivery source for the CloudFront Distribution logs:
aws logs put-delivery-source \
--name {{delivery-name}} \
--resource-arn {{distribution-arn}} \
--log-type ACCESS_LOGS
- Configure the delivery destination where the logs should be sent (CloudWatch Logs, Kinesis Data Firehose, or S3):
aws logs put-delivery-destination \
--name {{destination-name}} \
--delivery-destination-configuration {{delivery-destination-arn}}
- Link source and destination to bind your CloudFront distribution to the target destination:
aws logs create-delivery \
--delivery-source-name {{delivery-name}} \
--delivery-destination-arn {{delivery-destination-arn}}Using CloudFormationβ
- CloudFormation template (YAML):
... see more