Amazon CloudFront Functions now supports logging to CloudFront access logs

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

CloudFront Functions Custom Log Data

You can now write custom data directly into CloudFront access logs using a new helper method available from within CloudFront Functions. This allows you to log values such as A/B test variant assignments, authentication outcomes, or routing decisions directly into the CloudFront access log record for that request.

What to do

  • Use cf.logCustomData() from viewer request or viewer response functions.
  • Analyze function behavior and request outcomes in a single query.
  • Combine with existing console.log() functionality.

Source: AWS release notes




If you need further guidance on AWS, our experts are available at AWS@westloop.io. You may also reach us by submitting the Contact Us form.

Follow our blog

Get the latest insights and advice on AWS services from our experts.

By clicking Sign Up you're confirming that you agree with our Terms and Conditions.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.