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;

Dashboards

The query is used in the dashboards: