Table: aws_ec2_hosts

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

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

The primary key for this table is arn.

Columns

NameType
_cq_iduuid
_cq_parent_iduuid
account_idutf8
regionutf8
arn (PK)utf8
tagsjson
allocation_timetimestamp[us, tz=UTC]
allows_multiple_instance_typesutf8
asset_idutf8
auto_placementutf8
availability_zoneutf8
availability_zone_idutf8
available_capacityjson
client_tokenutf8
host_idutf8
host_maintenanceutf8
host_propertiesjson
host_recoveryutf8
host_reservation_idutf8
instancesjson
member_of_service_linked_resource_groupbool
outpost_arnutf8
owner_idutf8
release_timetimestamp[us, tz=UTC]
stateutf8

Example Queries

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

Unused dedicated host

SELECT
  'Unused dedicated host' AS title,
  account_id,
  arn AS resource_id,
  'fail' AS status
FROM
  aws_ec2_hosts
WHERE
  COALESCE(jsonb_array_length(instances), 0) = 0;