Getting Information About Prefix Lists

You can get information about one or more prefix lists that you can use:

  • In outbound security group rules to allow traffic to the corresponding service.

  • In route tables, to route traffic to the corresponding service using VPC endpoints.

Prefix lists are only available for instances in a Virtual Private Cloud (VPC). Each prefix list is composed of an ID, a name to identify the service it is associated with and a list of network prefixes used by this service, in CIDR notation. These network prefixes correspond to the range of IPs used by the service.

Getting Information About Prefix Lists Using OSC CLI

See the ReadNetAccessPointServices command sample in the documentation of the OUTSCALE API.

Getting Information About Prefix Lists Using AWS CLI

To get information about one or more prefix lists, use the describe-prefix-lists command following this syntax:

Request sample
$ aws ec2 describe-prefix-lists \
    --profile YOUR_PROFILE \
    --filters Name=prefix-list-id,Values=pl-12345678 \
    [--prefix-list-ids NOT_SPECIFIED] \

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) filters: One or more filters. The following filters are available:

    • prefix-list-id: The ID of a prefix list.

    • prefix-list-name: The name of a prefix list.

  • (optional) prefix-list-ids: One or more prefix list IDs.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The describe-prefix-lists command returns the following elements:

  • PrefixLists: Information about one or more prefix lists.

    • PrefixListName: The name of the prefix list.

    • Cidrs: One or more ranges of IPs used by the service, in CIDR notation.

    • PrefixListId: The ID of the prefix list.

Result sample
  "PrefixLists": [
      "PrefixListName": "",
      "Cidrs": [
      "PrefixListId": "pl-a14a8cdc"

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.