Interview Prep/AWS/Route 53, CloudFront and Messaging

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 →

  1. In the ALB SG allow 443 from the com.amazonaws.global.cloudfront.origin-facing prefix list
  2. Have CloudFront add a custom header X-Origin-Verify: <secret>
  3. ALB listener rule forwards only when the header matches, else 403
  4. Rotate the secret with Secrets Manager
  5. 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.

aws All AWS questions Roadmap: AWS core services

More on Route 53, CloudFront and Messaging