Table: aws_ec2_internet_gateways

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

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InternetGateway.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
attachmentsjson
internet_gateway_idutf8
owner_idutf8

Example Queries

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

Unused internet gateway

SELECT
  'Unused internet gateway' AS title,
  account_id,
  arn AS resource_id,
  'fail' AS status
FROM
  aws_ec2_internet_gateways
WHERE
  COALESCE(jsonb_array_length(attachments), 0) = 0;