CloudFront Functions vs Lambda@Edge
~8 min read
Two ways to run custom code at the edge — lightweight and fast versus full-featured and heavier.
CloudFront Functions vs Lambda@Edge is a Pro topic
Sign in, then upgrade to Pro or Power to unlock this topic and the full AWS curriculum.
Key points
- •CloudFront Functions: JavaScript only, sub-millisecond, full edge network, simple operations (redirects, header/URL manipulation)
- •Lambda@Edge: full Node.js/Python, more capable but higher latency/cost, runs at fewer regional edge locations
- •Only Lambda@Edge can modify origin selection or make external network calls
- •Default to CloudFront Functions unless you specifically need Lambda@Edge's extra capability