AWS › Amazon CloudFront & Content Delivery

How does CloudFront support multi region high availability and failover for an application?

Advanced

Answer

CloudFront can be configured with origin failover, where you designate a primary and a secondary origin, so if the primary origin becomes unavailable or returns errors, CloudFront automatically routes requests to the secondary origin instead, providing seamless failover without requiring any changes on the client side.
aws cloudfront create-distribution --distribution-config file://config-with-origin-group.json
Real-world example A global SaaS company configures CloudFront origin failover between its primary region's load balancer and a secondary region's load balancer, ensuring customers experience no downtime even if an entire AWS region has issues.

Common follow-ups: What criteria trigger a CloudFront failover to the secondary origin?;How does this compare to using Route 53 health checks for failover?