How to whitelist Cloudfront IPs in Load Balancer Security Group automatically

0

Hi All, Currently I am whitelisting cloudfront IPs by pulling the list of IPs shared by AWS in the URL (https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips) and adding all these IPs in Security Group attached with Load Balancer. This process is a manual process. I came to know about "Managed Prefix List" which I guess solve the same purpose, but the IP ranges are different than the JSON list mentioned in the URL shared by AWS as below

https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips

The IPs in "Managed Prefix List" are not same in the above list. Which one is the correct list?

질문됨 일 년 전1588회 조회
1개 답변
1

The Managed Prefix List is definitely the way to go. I know quite a few people who immediately deprecated their other processes when this was released. The previous Lambda-based solution at https://aws.amazon.com/blogs/security/automatically-update-security-groups-for-amazon-cloudfront-ip-ranges-using-aws-lambda/ now says to use the Managed Prefix List too.

As for why the lists are different, I noticed in https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LocationsOfEdgeServers.html that there's different terminology used across the options. The Managed Prefix List contains "IP address ranges of all of CloudFront's globally distributed origin-facing servers", whereas https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips contains "IP address ranges that are associated with CloudFront edge servers". The first sounds like a better list to me.

전문가
답변함 일 년 전
profile pictureAWS
전문가
kentrad
검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠