Protect an origin so that only CloudFront can reach your ALB.
AdvancedScenarioRoute 53, CloudFront and Messaging
Answer
Situation read → Use the managed prefix list and a secret header.
What I'd do →
- In the ALB SG allow 443 from the
com.amazonaws.global.cloudfront.origin-facingprefix list - Have CloudFront add a custom header
X-Origin-Verify: <secret> - ALB listener rule forwards only when the header matches, else 403
- Rotate the secret with Secrets Manager
- Or use VPC origins for private ALBs
Why → The prefix list stops direct IP access, the header stops other CloudFront distributions.
Interview tip → VPC origins removes the public ALB entirely.
More on Route 53, CloudFront and Messaging
You want users routed to the nearest healthy region. Which Route 53 policy do you use?BeginnerPrimary region fails; how do you fail over DNS in a controlled way?IntermediateWhat is the difference between a CNAME and an alias record in Route 53?BeginnerRoll out a new version to 5 percent of users using DNS. How?IntermediateCloudFront serves stale content after you deployed a new JS bundle. How do you handle cache correctly?IntermediateCloudFront returns 403 from an S3 origin. List the checks.Intermediate