How to Find IP Address Ranges used by Amazon S3

0 min read 77 words

You can query the ip-ranges Amazon AWS URL, and parse the results through jq as follows:

Generic S3 IP Ranges

Query:

curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="S3")'

Response:

{
  "ip_prefix": "3.5.140.0/22",
  "region": "ap-northeast-2",
  "service": "S3",
  "network_border_group": "ap-northeast-2"
}
{
  "ip_prefix": "52.219.170.0/23",
  "region": "eu-central-1",
  "service": "S3",
<truncated>

Region Specific S3 IP Ranges

Query:

curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.region=="eu-west-1") | select(.service=="S3") | .ip_prefix'

Response:

18.34.32.0/20
3.5.72.0/23
52.218.0.0/17
3.5.64.0/21
52.92.0.0/17
18.34.240.0/22
3.251.110.208/28
3.251.110.224/28
Tags:
Andrew
Andrew

Andrew is a visionary software engineer and DevOps expert with a proven track record of delivering cutting-edge solutions that drive innovation at Ataiva.com. As a leader on numerous high-profile projects, Andrew brings his exceptional technical expertise and collaborative leadership skills to the table, fostering a culture of agility and excellence within the team. With a passion for architecting scalable systems, automating workflows, and empowering teams, Andrew is a sought-after authority in the field of software development and DevOps.

Tags