<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/amazon-cloudfront-functions-now-supports-logging-to-cloudfront-access-logs-rc9tzrrqf" -->

---
title: Amazon CloudFront Functions now supports logging to...
description: CloudFront Functions now supports writing custom log data directly into CloudFront access logs via a new cf.logCustomData() helper method. Previously, function...
canonical: https://daily.dev/posts/amazon-cloudfront-functions-now-supports-logging-to-cloudfront-access-logs-rc9tzrrqf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Amazon CloudFront Functions now supports logging to CloudFront access logs | daily.dev
og:description: CloudFront Functions now supports writing custom log data directly into CloudFront access logs via a new cf.logCustomData() helper method. Previously, function...
og:url: https://daily.dev/posts/amazon-cloudfront-functions-now-supports-logging-to-cloudfront-access-logs-rc9tzrrqf
og:image: https://api.daily.dev/og/posts/RC9TzRrqf.png
og:image:alt: Amazon CloudFront Functions now supports logging to CloudFront access logs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon CloudFront Functions now supports logging to CloudFront access logs

**[AWS](https://daily.dev/sources/aws)** · 2 min read · 0 upvotes · 0 comments

## Summary

CloudFront Functions now supports writing custom log data directly into CloudFront access logs via a new cf.logCustomData() helper method. Previously, function log output went only to CloudWatch Logs as a separate file, requiring manual correlation with access logs. The new method lets developers log values like A/B test assignments, authentication outcomes, or routing decisions inline with the access log record for each request. It works with both real-time log configurations and standard logging (v2), enabling unified analysis in a single query. The feature is available in all CloudFront edge locations at no additional charge beyond standard invocation and log delivery pricing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://aws.amazon.com/about-aws/whats-new/2026/07/cloudfront-functions-access-logs>

## Similar posts on daily.dev

- [Amazon CloudWatch expands auto-enablement to Amazon CloudFront logs and 3 additional resource types](https://daily.dev/posts/amazon-cloudwatch-expands-auto-enablement-to-amazon-cloudfront-logs-and-3-additional-resource-types-nu0fepumx) · AWS · 0 upvotes · 0 comments
- [Amazon API Gateway now supports 1 MB execution logs with configurable delivery destinations](https://daily.dev/posts/amazon-api-gateway-now-supports-1-mb-execution-logs-with-configurable-delivery-destinations-xl3fzmrtu) · AWS · 0 upvotes · 0 comments
- [Simple Cross-Account Logging on AWS](https://daily.dev/posts/simple-cross-account-logging-on-aws-zdyhggbed) · AWS Fundamentals · 0 upvotes · 0 comments
- [Amazon S3 server access logs now deliver to Amazon CloudWatch Logs and Amazon S3 Tables](https://daily.dev/posts/amazon-s3-server-access-logs-now-deliver-to-amazon-cloudwatch-logs-and-amazon-s3-tables-y7na0fbwp) · AWS · 0 upvotes · 0 comments
- [Yelp Publishes Blueprint for Managing S3 Server-Access Logs at Massive Scale](https://daily.dev/posts/yelp-publishes-blueprint-for-managing-s3-server-access-logs-at-massive-scale-l0en9vc0e) · InfoQ · 2 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#aws](https://daily.dev/tags/aws), [#logging](https://daily.dev/tags/logging), [#edge-computing](https://daily.dev/tags/edge-computing)

[View this post on daily.dev](https://daily.dev/posts/amazon-cloudfront-functions-now-supports-logging-to-cloudfront-access-logs-rc9tzrrqf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Amazon CloudFront Functions now supports logging to CloudFront access logs","url":"https://daily.dev/posts/amazon-cloudfront-functions-now-supports-logging-to-cloudfront-access-logs-rc9tzrrqf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/amazon-cloudfront-functions-now-supports-logging-to-cloudfront-access-logs-rc9tzrrqf"},"datePublished":"2026-07-14T17:04:31.379Z","dateModified":"2026-07-14T17:04:51.737Z","description":"CloudFront Functions now supports writing custom log data directly into CloudFront access logs via a new cf.logCustomData() helper method. Previously, function...","image":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","thumbnailUrl":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","isAccessibleForFree":true,"articleSection":"AWS","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"AWS","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/aws","url":"https://daily.dev/sources/aws"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/amazon-cloudfront-functions-now-supports-logging-to-cloudfront-access-logs-rc9tzrrqf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,aws,logging,edge-computing","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AWS","item":"https://daily.dev/sources/aws"},{"@type":"ListItem","position":3,"name":"Amazon CloudFront Functions now supports logging to CloudFront access logs"}]}
```

