---
topic: developer-tools
author: Crashtech Editorial
published: Nov 19, 2026 · read: 5 min
---

CloudFront Functions Can Now Make Live Calls at the Edge

CloudFront Functions now support one network call per invocation, enabling live authorization and background beacons with strict limits.

– –

A CDN edge function has usually had to decide from the request and data already copied to the edge. A permission may have changed minutes ago; a campaign counter may live in a separate service. The new network-call support in CloudFront Functions gives that lightweight request path one live lookup. AWS announced cf.fetch() and cf.beacon() on November 18, 2026. The consequential change is that an edge function can consult a configured origin before it returns or forwards the viewer request. [1]

A hand-drawn edge station checks a live permission result before routing a parcel to the cache, while a separate signal travels in the background.
Conceptual sketch: a viewer request can ask a configured service for a decision before continuing. It is not an AWS architecture diagram.

One live call changes what the edge can know

CloudFront Functions are small JavaScript handlers associated with CloudFront events. Previously, they could inspect the request and consult values prepared in advance in CloudFront KeyValueStore, but not ask a live service about that request. A viewer-request function can now use cf.fetch() against an origin configured on the same distribution, inspect the response, and continue, reject, or otherwise adjust handling. AWS also describes cf.beacon() for background signals such as campaign measurements. [1] [3]

That makes different information sources fit different freshness needs. A redirect map that changes rarely can stay in KeyValueStore. A token revocation check or account permission may need current service state. A visit counter can be sent as an event without making the viewer wait for the collector. This is related to familiar API authorization and rate-limit design: the policy still belongs to an authoritative service, while the edge becomes a place to apply its response close to the request.

The new feature has a tight envelope

A function can make at most one network call per invocation, combining cf.fetch() and cf.beacon(). The default request-to-last-byte timeout is one second. Request and response bodies are each limited to 10 KB; headers and path/query data have their own small limits. AWS says these quotas are not adjustable. [2]

The target must be an origin configured on the same distribution. That boundary matters: the function is not a general fetch() client that can call arbitrary internet hosts. AWS recommends configuring the origin and its access controls, and notes that connections are reused and pooled. Operators should avoid exposing an authorization origin through a public cache behavior unless the application actually needs that route. [1]

For a decision check, the edge function is now part of the authorization path. If the service times out or returns a malformed result, the code must choose deliberately between fail-closed and fail-open behavior. For sensitive writes, continuing after an unknown decision is usually the wrong default. For low-risk public content, a stale or cached fallback may be acceptable if the policy and cache semantics are explicit. Those are application decisions; the feature itself does not make them safe.

A useful failure table should be written before rollout: missing token, explicit deny, service error, timeout, invalid response, and a successful allow. Then test the behavior at the viewer-request event with both cache hits and misses. In particular, confirm that a request cannot reuse another user’s cached authorization result. Cache keys and authorization state are easy to accidentally mix when edge logic controls personalized responses.

cf.beacon() solves a different problem

The beacon method is intended for fire-and-forget telemetry. AWS’s example reads a tracking identifier and sends it with edge-location and timestamp information to a configured metrics collector. Because the function runs before the cache lookup, it can record views of content served from cache too. The request does not wait for a collector response. [1]

That behavior is useful for small, bounded signals, but a background beacon should not become the only record for a consequential business action. The article’s core distinction is between a required decision (cf.fetch(), whose result controls the request) and a best-effort observation (cf.beacon(), which records something). A missing analytics signal should not silently change authorization or billing state.

Compare it with the other edge options

The new path may remove a separate proxy or move a quick check closer to the viewer. It does not automatically replace Lambda@Edge, an API gateway, or origin authorization. The one-call and one-second envelope favors a compact, predictable decision. A workflow needing multiple services, longer computation, large payloads, or durable side effects still belongs in a service designed for that work.

AWS cites a partner’s reported 60% lower cost for a bot-detection integration compared with its prior Lambda@Edge implementation. That is a vendor-reported partner result for one integration, not a general performance or savings guarantee. [1]

Before adopting the feature, measure the whole path: edge function invocation, network call charge, origin latency, cache behavior, and the cost of an authorization service that now handles a call at viewer-request frequency. CloudFront lists a $0.10 per million network-call charge in the launch post, in addition to the applicable function charges; pricing-plan eligibility also varies. Verify current pricing and quotas for your distribution before estimating savings. [1]

A practical adoption sequence

Start with a read-only decision whose existing origin path is measurable. Configure the origin on the distribution, keep it inaccessible through unrelated cache behaviors, and return a small, explicit response. Add a timeout path and a clear denial response; log only the minimum identifiers needed to debug policy decisions. Then compare edge results with the authoritative origin for a sample of requests before moving traffic.

Use a beacon only for bounded event data that can tolerate loss and has an established retention policy. If the event is needed for an audit or transaction, send it through a durable application path instead.

The value of this launch is not that every request should now call home. It is that some decisions that were previously forced back to an origin can be made at the edge after one fast, constrained lookup. Keep the decision small, the origin authoritative, and the failure behavior visible.

Advertisement

Frequently asked questions

Can a CloudFront Function call any arbitrary public API?

No. The function can call an origin configured on the same CloudFront distribution, and the new network-call quotas limit each invocation to one request with a one-second timeout.

Does cf.beacon delay a cached response?

AWS describes cf.beacon as a background, fire-and-forget signal. It can count a view before cache lookup, including a cached response, without waiting for the collector response.

Should every API move authorization to CloudFront Functions?

No. The feature is useful when edge rejection or request-specific routing helps, but its call and response limits, failure behavior and authorization-service availability must fit the workload.

Sources & further reading

/* Comments */