turbot/aws_insights

Query: lambda_function_public_count

Usage

powerpipe query aws_insights.query.lambda_function_public_count

Steampipe Tables

SQL

select
count(*) as value,
'Publicly Accessible' as label,
case count(*) when 0 then 'ok' else 'alert' end as "type"
from
aws_lambda_function
where
policy_std -> 'Statement' ->> 'Effect' = 'Allow'
and (
policy_std -> 'Statement' ->> 'Prinipal' = '*'
or ( policy_std -> 'Principal' -> 'AWS' ) :: text = '*'
);

Dashboards

The query is used in the dashboards: