CloudFront Functions can now log custom data to access logs
Amazon CloudFront Functions can now write custom data directly into CloudFront access logs using a new helper method, `cf.logCustomData()`. This simplifies analysis by consolidating function decisions and request outcomes into a single log record, eliminating the need to correlate separate logging systems. This enhancement is available today in all CloudFront edge locations and works with both real-time and standard (v2) logging configurations.
- →Log custom data to CloudFront access logs
- →Log custom data without needing separate logging systems
- →Availability and Pricing
Features (1) ›
- Log custom data to CloudFront access logs
CloudFront Functions can now use `cf.logCustomData()` to emit custom values directly into CloudFront access logs. This enables analysis of function behavior and request outcomes within a single query by correlating with real-time or standard (v2) logging.
Enhancements (1) ›
- Log custom data without needing separate logging systems
Previously, custom log data from CloudFront Functions could only be sent to Amazon CloudWatch Logs. The new `cf.logCustomData()` method eliminates the need to correlate function decisions with CloudFront access log data across separate logging systems.
Notes (1) ›
- Availability and Pricing
This functionality is available today in all CloudFront edge locations. There is no additional charge for using `cf.logCustomData()`, though standard CloudFront Functions invocation pricing and access log delivery charges still apply.
https://aws.amazon.com/about-aws/whats-new/2026/07/cloudfront-functions-access-logs/
Related releases
- AWS CloudFormation/CDK Express Mode Speeds Deployments AWS What's New ·
- AWS WAF adds AI traffic monetization for bots AWS What's New ·
- AWS Lambda adds Java 8, 11, 17 support on Amazon Linux 2023 AWS What's New ·
- Amazon RDS for Oracle adds Reserved Instances for R8i/M8i AWS What's New ·
- Amazon Aurora DSQL adds multi-Region cluster support in four more Regions AWS What's New ·
- CloudWatch adds managed Prometheus collectors AWS What's New ·