turbot/aws_perimeter

Control: API Gateway APIs should prohibit public access

Description

This control checks whether AWS API Gateway APIs are only accessible through private API endpoints and not visible to the public Internet. A private API can be accessed only privately through the interface VPC endpoint.

Usage

Run the control in your terminal:

powerpipe control run aws_perimeter.control.api_gateway_rest_api_prohibit_public_access

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_perimeter.control.api_gateway_rest_api_prohibit_public_access --share

Steampipe Tables

SQL

select
title as resource,
case
when endpoint_configuration_types != '["PRIVATE"]' then 'alarm'
else 'ok'
end status,
case
when endpoint_configuration_types != '["PRIVATE"]' then title || ' endpoint publicly accessible.'
else title || ' endpoint not publicly accessible.'
end reason
, region, account_id
from
aws_api_gateway_rest_api;

Tags