Table: aws_ec2_managed_prefix_list_entry - Query AWS EC2 Managed Prefix List Entry using SQL
The AWS EC2 Managed Prefix List Entry is a part of Amazon Elastic Compute Cloud (EC2) service. It helps you to manage IP address ranges, allowing you to create lists of IP address ranges, known as prefix lists, and use them to simplify the configuration of security groups and route tables. This makes it easier to set up, secure, and manage the network access to your Amazon EC2 instances.
Table Usage Guide
The aws_ec2_managed_prefix_list_entry
table in Steampipe provides you with information about the IP address ranges, or prefixes, that AWS has added to a managed prefix list. This table allows you, as a DevOps engineer, to query prefix-specific details, including the CIDR block, description, and the prefix list ID. You can utilize this table to gather insights on the managed prefix lists, such as the IP address ranges included in a managed prefix list, and more. The schema outlines for you the various attributes of the managed prefix list entry, including the CIDR, description, and prefix list ID.
Examples
Basic Info
Explore which AWS EC2 managed prefix list entries exist in your environment. This can help you determine if there are any unexpected or unnecessary entries that may need to be addressed for security or efficiency reasons.
select prefix_list_id, cidr, descriptionfrom aws_ec2_managed_prefix_list_entry;
select prefix_list_id, cidr, descriptionfrom aws_ec2_managed_prefix_list_entry;
List customer-managed prefix lists entries
Explore which customer-managed prefix lists entries are owned by entities other than AWS. This can be useful to understand the distribution and ownership of these resources, helping you to manage and control access to your network resources.
select l.name, l.id, e.cidr, e.description, l.state, l.owner_idfrom aws_ec2_managed_prefix_list_entry as e, aws_ec2_managed_prefix_list as lwhere l.owner_id <> 'AWS';
select l.name, l.id, e.cidr, e.description, l.state, l.owner_idfrom aws_ec2_managed_prefix_list_entry as e, aws_ec2_managed_prefix_list as lwhere l.owner_id <> 'AWS';
Count prefix list entries by prefix list
Discover the segments that have varying numbers of entries in AWS EC2 managed prefix lists, providing a useful summary of the distribution of entries across different lists. This can assist in identifying any disproportionate allocation of entries which may require rebalancing.
select prefix_list_id, count(cidr) as numbers_of_entriesfrom aws_ec2_managed_prefix_list_entrygroup by prefix_list_id;
select prefix_list_id, count(cidr) as numbers_of_entriesfrom aws_ec2_managed_prefix_list_entrygroup by prefix_list_id;
Schema for aws_ec2_managed_prefix_list_entry
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
cidr | text | The CIDR block. | |
description | text | The description of the entry. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
prefix_list_id | text | = | The ID of the prefix list. |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_ec2_managed_prefix_list_entry