CloudFront VPC Origin 504 Errors Traced to Security Group Source Range Misconfiguration

A developer building a private-ingress edge on AWS, with CloudFront fronting a private Network Load Balancer, found every request returning a 504 Gateway Timeout despite a healthy target group. The root cause was a security group rule scoped to the VPC CIDR, which silently dropped connections because CloudFront connects from its public origin-facing IP ranges. Since the NLB preserves client source IPs, the security group never saw in-VPC addresses. The fix was to allow inbound 443 from AWS's managed CloudFront origin-facing prefix list instead. After the change, requests returned 200 without other modifications.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in