Table: aws_ec2_eips

This table shows data for Amazon Elastic Compute Cloud (EC2) Eips.

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Address.html (opens in a new tab)

The composite primary key for this table is (account_id, region, allocation_id).

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_id (PK)utf8
region (PK)utf8
tagsjson
allocation_id (PK)utf8
association_idutf8
carrier_iputf8
customer_owned_iputf8
customer_owned_ipv4_poolutf8
domainutf8
instance_idutf8
network_border_grouputf8
network_interface_idutf8
network_interface_owner_idutf8
private_ip_addressutf8
public_iputf8
public_ipv4_poolutf8

Example Queries

These SQL queries are sampled from CloudQuery policies and are compatible with PostgreSQL.

Unused EC2 EIP

SELECT
  'Unused EC2 EIP' AS title,
  account_id,
  allocation_id AS resource_id,
  'fail' AS status
FROM
  aws_ec2_eips
WHERE
  association_id IS NULL;

Unused EC2 EIPs should be removed

SELECT
  'Unused EC2 EIPs should be removed' AS title,
  account_id,
  public_ip AS resource_id,
  CASE WHEN instance_id IS NULL THEN 'fail' ELSE 'pass' END AS status
FROM
  aws_ec2_eips;