aws AWS What's New ·

CloudFront Functions can now log custom data to access logs

infraawsengineeraws-cloudfront
feature

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.

Read the original announcement →

https://aws.amazon.com/about-aws/whats-new/2026/07/cloudfront-functions-access-logs/

Related releases