CloudFront Functions vs Lambda@Edge?
AdvancedConceptDNS, CDN and Messaging
Answer
CloudFront Functions: JavaScript, run at the edge location itself, sub-millisecond, viewer request/response events only, no network or file access; for header manipulation, redirects, URL rewrites, simple auth. Lambda@Edge: Node.js/Python, runs in regional edge caches, supports all four events (viewer and origin request/response), network access and longer execution; created in us-east-1 and replicated.
Use Functions by default; Lambda@Edge when you need to call out or manipulate bodies.
More on DNS, CDN and Messaging
What are the Route 53 record types and why use Alias instead of CNAME?BeginnerDescribe Route 53 routing policies.IntermediateHow do Route 53 health checks and DNS failover work?AdvancedWhat is a Route 53 private hosted zone?IntermediateHow does DNS TTL relate to failover and migrations?BeginnerWhat are Route 53 Resolver endpoints and rules?Advanced