AWS IP 주소 범위
4389 단어 AWS
개시하다
보안 그룹의 인바운드, 아웃바운드에서 AWS의 서비스(API Gateway, S3 등)를 허가하려면 AWS IP 주소의 범위를 참조하여 설정할 수 있다.
AWS IP 주소 범위
AWS의 IP 주소 범위 변경 알림
AWS의 IP 주소 범위가 변경되면 SNS 알림 설정을 하고 이를 수신하면 차점을 유지합니다.
설정 방법: https://docs.aws.amazon.com/ja_jp/general/latest/gr/aws-ip-ranges.html#subscribe-notifications
파이썬 서비스의 IP로 검색하는 예 import urllib.request
import json
def get_ip_groups_json(url):
response = urllib.request.urlopen(url)
ip_json = response.read()
return ip_json
def get_ranges_for_service(ip_range_url, service, subset):
ip_ranges_json = json.loads(get_ip_groups_json(ip_range_url))
service_ranges = list()
for prefix in ip_ranges_json['prefixes']:
if prefix['service'] == service and subset == prefix['region']:
service_ranges.append(prefix['ip_prefix'])
return service_ranges
ip_ranges = get_ranges_for_service('https://ip-ranges.amazonaws.com/ip-ranges.json', 'S3', 'ap-southeast-1')
for ip in ip_ranges: print(str(ip))
결과:
Lambda를 통한 자동 업데이트
자동 유지 보수 작업을 원하는 경우 Lambda를 통해 보안 그룹을 업데이트할 수 있습니다.
샘플: update-security-groups
참조 Doc: AWS IP 주소 범위
이상
Reference
이 문제에 관하여(AWS IP 주소 범위), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/chenglin/items/059ed1533fce9e45746c
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)

AWS의 IP 주소 범위 변경 알림
AWS의 IP 주소 범위가 변경되면 SNS 알림 설정을 하고 이를 수신하면 차점을 유지합니다.
설정 방법: https://docs.aws.amazon.com/ja_jp/general/latest/gr/aws-ip-ranges.html#subscribe-notifications
파이썬 서비스의 IP로 검색하는 예 import urllib.request
import json
def get_ip_groups_json(url):
response = urllib.request.urlopen(url)
ip_json = response.read()
return ip_json
def get_ranges_for_service(ip_range_url, service, subset):
ip_ranges_json = json.loads(get_ip_groups_json(ip_range_url))
service_ranges = list()
for prefix in ip_ranges_json['prefixes']:
if prefix['service'] == service and subset == prefix['region']:
service_ranges.append(prefix['ip_prefix'])
return service_ranges
ip_ranges = get_ranges_for_service('https://ip-ranges.amazonaws.com/ip-ranges.json', 'S3', 'ap-southeast-1')
for ip in ip_ranges: print(str(ip))
결과:
Lambda를 통한 자동 업데이트
자동 유지 보수 작업을 원하는 경우 Lambda를 통해 보안 그룹을 업데이트할 수 있습니다.
샘플: update-security-groups
참조 Doc: AWS IP 주소 범위
이상
Reference
이 문제에 관하여(AWS IP 주소 범위), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/chenglin/items/059ed1533fce9e45746c
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
import urllib.request
import json
def get_ip_groups_json(url):
response = urllib.request.urlopen(url)
ip_json = response.read()
return ip_json
def get_ranges_for_service(ip_range_url, service, subset):
ip_ranges_json = json.loads(get_ip_groups_json(ip_range_url))
service_ranges = list()
for prefix in ip_ranges_json['prefixes']:
if prefix['service'] == service and subset == prefix['region']:
service_ranges.append(prefix['ip_prefix'])
return service_ranges
ip_ranges = get_ranges_for_service('https://ip-ranges.amazonaws.com/ip-ranges.json', 'S3', 'ap-southeast-1')
for ip in ip_ranges: print(str(ip))
결과:
Lambda를 통한 자동 업데이트
자동 유지 보수 작업을 원하는 경우 Lambda를 통해 보안 그룹을 업데이트할 수 있습니다.
샘플: update-security-groups
참조 Doc: AWS IP 주소 범위
이상
Reference
이 문제에 관하여(AWS IP 주소 범위), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/chenglin/items/059ed1533fce9e45746c
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Reference
이 문제에 관하여(AWS IP 주소 범위), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/chenglin/items/059ed1533fce9e45746c텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)