turbot/aws_insights

Query: lambda_function_public

Usage

powerpipe query aws_insights.query.lambda_function_public

Steampipe Tables

SQL

select
'Public Access' as label,
case when
policy_std -> 'Statement' ->> 'Effect' = 'Allow'
and ( policy_std -> 'Statement' ->> 'Prinipal' = '*'
or ( policy_std -> 'Principal' -> 'AWS' ) :: text = '*'
) then 'Enabled' else 'Disabled' end as value,
case
when
policy_std -> 'Statement' ->> 'Effect' = 'Allow'
and ( policy_std -> 'Statement' ->> 'Prinipal' = '*'
or ( policy_std -> 'Principal' -> 'AWS' ) :: text = '*'
) then 'ok' else 'alert' end as type
from
aws_lambda_function
where
arn = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4);

Dashboards

The query is used in the dashboards: