Fork me on GitHub

Not sure what you mean by private vpc. You will need to put your instance into a public subnet (associated with a internet gateway).


Usually you'd have in a VPC a public subnet, that has a route to internet gateway and put a NAT gateway in that subnet and then have private subnet, that has a route to the NAT gateway, so that hosts in the private subnet are not directly accessible from the internet and don't have public IP addresses. Then you'd put a load balancer (ALB) into the public subnet and have a listener in the load balancer direct traffic to say EC2 instance or ECS service etc. Not sure if Cloudfront can reach a private subnet directly, but there might be something in API Gateway for such

🙏 1