turbot/steampipe-mod-aws-compliance

Control: Lambda functions should restrict public URL

Description

This control verifies that the Lambda function does not have a publicly accessible URL. Exposing services publicly could potentially make sensitive data accessible to malicious actors.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.lambda_function_restrict_public_url

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.lambda_function_restrict_public_url --share

SQL

This control uses a named query:

select
arn as resource,
case
when url_config is null then 'info'
when url_config ->> 'AuthType' = 'AWS_IAM' then 'ok'
else 'alarm'
end as status,
case
when url_config is null then title || ' having no URL config.'
when url_config ->> 'AuthType' = 'AWS_IAM' then title || ' restricts public function URL.'
else title || ' public function URL configured.'
end as reason
, region, account_id
from
aws_lambda_function;

Tags