Table: aws_vpc_eip - Query AWS VPC Elastic IP Addresses using SQL
An AWS VPC Elastic IP Address is a static, public IPv4 address designed for dynamic cloud computing. It allows you to mask the failure of an instance or software by rapidly remapping the address to another instance in your account. With an Elastic IP address, you can manage your own IP addressing, connectivity, security, and delivery control in the AWS Cloud.
Table Usage Guide
The aws_vpc_eip
table in Steampipe provides you with information about Elastic IP Addresses (EIP) within AWS Virtual Private Cloud (VPC). This table allows you, as a DevOps engineer, to query EIP-specific details, including allocation IDs, association IDs, domain, public IP, and associated metadata. You can utilize this table to gather insights on Elastic IP Addresses, such as their allocation status, associated instances, network interface details, and more. The schema outlines the various attributes of the Elastic IP Address for you, including the public IPv4 address, allocation ID, association ID, domain, instance ID, network interface ID, private IP address, and associated tags.
Examples
List of unused elastic IPs
Identify instances where Elastic IPs are not currently in use within your AWS VPC environment. This can help in resource management and cost reduction by releasing unnecessary IPs.
select public_ip, domain association_idfrom aws_vpc_eipwhere association_id is null;
select public_ip, domain association_idfrom aws_vpc_eipwhere association_id is null;
Count of elastic IPs by instance Ids
Discover the segments that have differing numbers of elastic IPs within your AWS VPC environment. This allows for efficient allocation and management of your public IPv4 resources.
select public_ipv4_pool, count(public_ip) as elastic_ipsfrom aws_vpc_eipgroup by public_ipv4_pool;
select public_ipv4_pool, count(public_ip) as elastic_ipsfrom aws_vpc_eipgroup by public_ipv4_pool;
Schema for aws_vpc_eip
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
allocation_id | text | = | Contains the ID representing the allocation of the address for use with EC2-VPC. |
arn | text | The Amazon Resource Name (ARN) specifying the VPC EIP. | |
association_id | text | = | Contains the ID representing the association of the address with an instance in a VPC. |
carrier_ip | text | The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). | |
customer_owned_ip | inet | The customer-owned IP address. | |
customer_owned_ipv4_pool | text | The ID of the customer-owned address pool. | |
domain | text | = | Indicates whether Elastic IP address is for use with instances in EC2-Classic (standard) or instances in a VPC (vpc). |
instance_id | text | = | Contains the ID of the instance that the address is associated with. |
network_border_group | text | = | The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which AWS advertises IP addresses. |
network_interface_id | text | = | The ID of the network interface. |
network_interface_owner_id | text | = | The ID of the AWS account that owns the network interface. |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
private_ip_address | inet | = | The private IP address associated with the Elastic IP address. |
public_ip | inet | = | Contains the Elastic IP address. |
public_ipv4_pool | text | The ID of an address pool. | |
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. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | A list of tags that are attached to the vpc. | |
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_vpc_eip