turbot/aws_insights

Query: lambda_function_public_status

Usage

powerpipe query aws_insights.query.lambda_function_public_status

Steampipe Tables

SQL

with functions as (
select
case
when
policy_std -> 'Statement' ->> 'Effect' = 'Allow'
and ( policy_std -> 'Statement' ->> 'Prinipal' = '*'
or ( policy_std -> 'Principal' -> 'AWS' ) :: text = '*'
) then 'public'
else 'private'
end as visibility
from
aws_lambda_function
)
select
visibility,
count(*)
from
functions
group by
visibility;

Dashboards

The query is used in the dashboards: