Control: API Gateway V2 authorizer should be configured
Description
This control checks whether API Gateway V2 has an authorizer configured. This rule is non-compliant if API Gateway V2 has no authorizers configured.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.api_gatewayv2_route_authorizer_configured
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.api_gatewayv2_route_authorizer_configured --share
SQL
This control uses a named query:
select 'arn:' || partition || ':apigateway:' || region || '::/apis/' || api_id || '/routes/' || route_id as resource, case when authorizer_id is null then 'alarm' else 'ok' end as status, case when authorizer_id is null then route_id || ' authorizer not configured.' else route_id || ' authorizer ' || authorizer_id || ' configured.' end as reason , region, account_idfrom aws_api_gatewayv2_route;