Table: aws_ec2_vpc_endpoints

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

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_VpcEndpoint.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
creation_timestamptimestamp[us, tz=UTC]
dns_entriesjson
dns_optionsjson
groupsjson
ip_address_typeutf8
last_errorjson
network_interface_idslist<item: utf8, nullable>
owner_idutf8
policy_documentutf8
private_dns_enabledbool
requester_managedbool
route_table_idslist<item: utf8, nullable>
service_nameutf8
stateutf8
subnet_idslist<item: utf8, nullable>
vpc_endpoint_idutf8
vpc_endpoint_typeutf8
vpc_idutf8

Example Queries

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

Amazon EC2 should be configured to use VPC endpoints that are created for the Amazon EC2 service

WITH
  endpoints
    AS (
      SELECT
        vpc_endpoint_id
      FROM
        aws_ec2_vpc_endpoints
      WHERE
        vpc_endpoint_type = 'Interface'
        AND service_name ~ concat('com.amazonaws.', region, '.ec2')
    )
SELECT
  'Amazon EC2 should be configured to use VPC endpoints that are created for the Amazon EC2 service'
    AS title,
  account_id,
  vpc_id AS resource_id,
  CASE
  WHEN endpoints.vpc_endpoint_id IS NULL THEN 'fail'
  ELSE 'pass'
  END
    AS status
FROM
  aws_ec2_vpcs
  LEFT JOIN endpoints ON aws_ec2_vpcs.vpc_id = endpoints.vpc_endpoint_id;