AWS
The cipr aws command allows you to retrieve IP ranges for Amazon Web Services (AWS).
Usage
CLI command
cipr aws [flags]
Data Format
You can find data format (and filter value guidelines) of the aws command output here: AWS command data format
Flags
| Flag | Description | Default | Required | Multiple values |
|---|---|---|---|---|
| --ipv4 | Get only IPv4 ranges. | ❌ | ❌ | ❌ |
| --ipv6 | Get only IPv6 ranges. | ❌ | ❌ | ❌ |
| --filter | Filter results using a single string. Syntax: region,service,network-border-group. | ❌ | ❌ | ❌ |
| --filter-region | Filter results by AWS region. | ❌ | ❌ | ❌ |
| --filter-service | Filter results by AWS service. | ❌ | ❌ | ❌ |
| --filter-network-border-group | Filter results by AWS network border group. | ❌ | ❌ | ❌ |
| --list | List unique values for a dimension instead of IP ranges. Valid: regions, services, network-border-groups. | ❌ | ❌ | ❌ |
--filter cannot be combined with --filter-region, --filter-service, or --filter-network-border-group. When neither --ipv4 nor --ipv6 is set, both are fetched. --list composes with the --filter* flags but ignores --ipv4/--ipv6.
Examples
tip
IP ranges in the 'Output' blocks might not be up to date!
Get all AWS IPv4 ranges
CLI command
cipr aws --ipv4
Output
...
35.71.111.0/24
52.94.13.0/24
52.94.7.0/24
...
Get AWS IPv6 ranges for the eu-west-1 region with mini verbosity
CLI command
cipr aws --ipv6 --filter-region eu-west-1 --verbose-mode mini
Output
...
2a05:d076:8000::/40,eu-west-1,AMAZON,eu-west-1
2600:1f01:4802::/47,eu-west-1,AMAZON,eu-west-1
2606:f40:1000::/39,eu-west-1,AMAZON,eu-west-1
2a05:d031:8000::/40,eu-west-1,AMAZON,eu-west-1
2a01:578:0:7000::/56,eu-west-1,AMAZON,eu-west-1
...
Get all AWS IP ranges for the EC2 service in the us-east-1 with full verbosity
CLI command
cipr aws --filter us-east-1,ec2 --verbose
Output
...
IP Prefix: 3.3.2.0/24, Region: us-east-1, Service: EC2, Network Border Group: us-east-1
IP Prefix: 96.0.48.0/21, Region: us-east-1, Service: EC2, Network Border Group: us-east-1-scl-1
IP Prefix: 2600:f0f0:2::/48, Region: us-east-1, Service: EC2, Network Border Group: us-east-1
IP Prefix: 2605:9cc0:1ff0:500::/56, Region: us-east-1, Service: EC2, Network Border Group: us-east-1
IP Prefix: 2600:1f19:8000::/36, Region: us-east-1, Service: EC2, Network Border Group: us-east-1
...
List all AWS regions
CLI command
cipr aws --list regions
Output
...
ap-northeast-1
ap-southeast-1
eu-central-1
eu-west-1
us-east-1
us-west-2
...
List AWS services available in eu-central-1
CLI command
cipr aws --filter-region eu-central-1 --list services
Output
...
AMAZON
EC2
ROUTE53_HEALTHCHECKS
S3
...