I have a CloudFront Distribution
with WAF
(Web Application Firewall) attached to it, to restrict public access.
I also have a fleet of EC2 instances running under an ASG
(autoScaling Group) and I wish to whitelist the EC2 instances to access the CloudFront distribution. Is it possible to create such a configuration in my infrastructure?
Please note that the IP addresses of the EC2 instances are not fixed. They are controlled by the ASG attached. Also, the ASG is created in a public subnet. Any help would be appreciated. Thanks