# Amazon CloudFront Functions

Published articles for Amazon CloudFront Functions.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Introducing network calls in Amazon CloudFront Functions

DevFeed: [Introducing network calls in Amazon CloudFront Functions](<https://devfeed.tech/articles/introducing-network-calls-in-amazon-cloudfront-functions-141165.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-network-calls-in-amazon-cloudfront-functions/>)

Author: Babur Khan

Published: 2026-11-18T20:16:51Z

Content type: release

Language: en

Sources: [Networking & Content Delivery](<https://devfeed.tech/sources/networking-content-delivery.md>)

Topics: [Dynamic authorization rules](<https://devfeed.tech/topics/dynamic-authorization-rules.md>), [serverless monitoring](<https://devfeed.tech/topics/serverless-monitoring.md>), [API Logging](<https://devfeed.tech/topics/api-logging.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [amazon-api-gateway](<https://devfeed.tech/tags/amazon-api-gateway.md>), [amazon-cloudfront](<https://devfeed.tech/tags/amazon-cloudfront.md>), [amazon-cloudfront-functions](<https://devfeed.tech/tags/amazon-cloudfront-functions.md>), [announcements](<https://devfeed.tech/tags/announcements.md>), [api](<https://devfeed.tech/tags/api.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [background](<https://devfeed.tech/tags/background.md>), [beacon](<https://devfeed.tech/tags/beacon.md>), [bot](<https://devfeed.tech/tags/bot.md>), [budget](<https://devfeed.tech/tags/budget.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [campaign](<https://devfeed.tech/tags/campaign.md>), [cloudfront](<https://devfeed.tech/tags/cloudfront.md>), [collecting](<https://devfeed.tech/tags/collecting.md>), [edge](<https://devfeed.tech/tags/edge.md>), [lambda-edge](<https://devfeed.tech/tags/lambda-edge.md>), [latency](<https://devfeed.tech/tags/latency.md>), [launch](<https://devfeed.tech/tags/launch.md>), [network-calls](<https://devfeed.tech/tags/network-calls.md>), [networking-content-delivery](<https://devfeed.tech/tags/networking-content-delivery.md>)

### AI overview

CloudFront Functions now supports `cf.fetch()` and `cf.beacon()` for network calls to origins configured on the same distribution. `cf.fetch()` lets a viewer request function consult a live service, such as an authorization or bot detection service, and use its response to allow, block, or redirect a request; `cf.beacon()` sends background events without delaying the page response, including for cached views. The example requires the `cloudfront-js-2.0` runtime, a configured origin, and association with a Viewer Request event. The announcement reports DataDome saw 60% lower customer cost than with its Lambda@Edge implementation. Network calls cost $0.10 per million in addition to invocation charges; flat-rate plans require Pro tier or above.

### Source excerpt

Amazon CloudFront lets you securely deliver static and dynamic content with low latency and high transfer speeds. With CloudFront Functions, you can run business logic such as redirecting requests, selectively routing to alternate origin, or modifying headers at every CloudFront edge location with low latency and scale. Today, we are introducing network calls in CloudFront [...]

## EPG-enriched ad requests with CloudFront Functions and AWS Elemental MediaTailor

DevFeed: [EPG-enriched ad requests with CloudFront Functions and AWS Elemental MediaTailor](<https://devfeed.tech/articles/epg-enriched-ad-requests-with-cloudfront-functions-and-aws-elemental-mediatailor-137871.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/media/epg-enriched-ad-requests-with-cloudfront-functions-and-aws-elemental-mediatailor/>)

Author: Ian Oatley

Published: 2026-11-17T00:04:49Z

Content type: tutorial

Language: en

Sources: [AWS for M&E Blog](<https://devfeed.tech/sources/aws-for-m-e-blog.md>)

Topics: [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [function as a service](<https://devfeed.tech/topics/function-as-a-service.md>), [Amazon EventBridge](<https://devfeed.tech/topics/amazon-eventbridge.md>), [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>)

Tags: [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [amazon-cloudfront](<https://devfeed.tech/tags/amazon-cloudfront.md>), [amazon-cloudfront-functions](<https://devfeed.tech/tags/amazon-cloudfront-functions.md>), [aws](<https://devfeed.tech/tags/aws.md>), [aws-elemental-mediatailor](<https://devfeed.tech/tags/aws-elemental-mediatailor.md>), [cloudfront](<https://devfeed.tech/tags/cloudfront.md>), [epg](<https://devfeed.tech/tags/epg.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>)

### AI overview

The pipeline keeps linear TV ad requests aligned with the program currently airing, even during long viewer sessions: a scheduled Lambda fetches EPG schedules every six hours, compacts program data into time-block indexes in CloudFront KeyValueStore, and a CloudFront Function looks up the current program at each MediaTailor PRE_ADS_REQUEST. MediaTailor appends that metadata to the ad decision server URL. In FetchTV's deployment, the lookup added about 10 ms, with reported p50/p95/p99 latencies of 9/15/22 ms and 100% enrichment across roughly 14,000 ad breaks over three days. Pre-computation avoids parsing full-day schedules within MediaTailor's shared 2,000 ms hook budget; KVS also avoids origin round trips and the MediaTailor response-body size constraint. The design targets live-edge playback; DVR or start-over requires a stream- or session-supplied timestamp instead of the current time. Failures time out open, sending ad requests without metadata, so logs need monitoring. The shared-secret header is described as a lightweight access check, with AWS WAF suggested for larger deployments at added cost.

### Source excerpt

Linear TV ad requests often carry stale program metadata because viewer sessions stay open for hours while programs change. We show how to enrich every ad break with current EPG metadata using Amazon CloudFront Functions, CloudFront KeyValueStore, and AWS Elemental MediaTailor Monetization Functions, at about $14 per month.

## Building Multi-Region Active-Active Architectures with CloudFront VPC origins and Advanced Routing

DevFeed: [Building Multi-Region Active-Active Architectures with CloudFront VPC origins and Advanced Routing](<https://devfeed.tech/articles/building-multi-region-active-active-architectures-with-cloudfront-vpc-origins-and-advanced-routing-49867.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/networking-and-content-delivery/building-multi-region-active-active-architectures-with-cloudfront-vpc-origins-and-advanced-routing/>)

Author: Hiroki Harigai

Published: 2026-08-26T15:26:31Z

Content type: tutorial

Language: en

Sources: [Networking & Content Delivery](<https://devfeed.tech/sources/networking-content-delivery.md>)

Topics: [Amazon VPC](<https://devfeed.tech/topics/amazon-vpc.md>), [Network](<https://devfeed.tech/topics/network.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [session affinity](<https://devfeed.tech/topics/session-affinity.md>)

Tags: [amazon-cloudfront](<https://devfeed.tech/tags/amazon-cloudfront.md>), [amazon-cloudfront-functions](<https://devfeed.tech/tags/amazon-cloudfront-functions.md>), [application-load-balancer](<https://devfeed.tech/tags/application-load-balancer.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [architectures](<https://devfeed.tech/tags/architectures.md>), [availability](<https://devfeed.tech/tags/availability.md>), [aws](<https://devfeed.tech/tags/aws.md>), [backend](<https://devfeed.tech/tags/backend.md>), [cloudfront](<https://devfeed.tech/tags/cloudfront.md>), [connectivity](<https://devfeed.tech/tags/connectivity.md>), [elastic-load-balancing](<https://devfeed.tech/tags/elastic-load-balancing.md>), [failover](<https://devfeed.tech/tags/failover.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implement](<https://devfeed.tech/tags/implement.md>), [networking-content-delivery](<https://devfeed.tech/tags/networking-content-delivery.md>), [performance](<https://devfeed.tech/tags/performance.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [resilience](<https://devfeed.tech/tags/resilience.md>), [resiliency](<https://devfeed.tech/tags/resiliency.md>), [routing](<https://devfeed.tech/tags/routing.md>), [security](<https://devfeed.tech/tags/security.md>), [session-affinity](<https://devfeed.tech/tags/session-affinity.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [traffic-management](<https://devfeed.tech/tags/traffic-management.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>), [vpc](<https://devfeed.tech/tags/vpc.md>)

### AI overview

This AWS post explains how to build a multi-region active-active architecture with Amazon CloudFront VPC origins. It describes geo-based, weighted, and session-affinity routing, along with automated origin failover, while keeping backend resources private inside Amazon VPC.

### Source excerpt

Introduction Building a multi-region active-active architecture with Amazon CloudFront requires careful coordination of traffic routing to address performance, traffic management, and session consistency requirements, along with automated failover to maintain availability during regional events. In November 2024, AWS released Amazon CloudFront VPC origins, which provides direct connectivity to private resources within your Amazon VPC without [...]