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 console simplifies coding agent setup for serverless development AWS What's New ·
- AWS Managed Service for Apache Flink adds AI Agent Skills AWS What's New ·
- AWS Partner Central Adds AI-Powered Lead Prospecting AWS What's New ·
- AWS Elastic Disaster Recovery supports EBS volume initialization rate AWS What's New ·