turbot/aws_insights

Query: lambda_function_public_access_table

Usage

powerpipe query aws_insights.query.lambda_function_public_access_table

SQL

select
f.name as "Name",
case
when
f.policy_std -> 'Statement' ->> 'Effect' = 'Allow'
and (f.policy_std -> 'Statement' ->> 'Prinipal' = '*'
or ( f.policy_std -> 'Principal' -> 'AWS' ) :: text = '*')
then 'Public' else 'Private' end as "Public/Private",
a.title as "Account",
f.account_id as "Account ID",
f.region as "Region",
f.arn as "ARN"
from
aws_lambda_function as f,
aws_account as a
where
f.account_id = a.account_id
order by
f.name;

Dashboards

The query is used in the dashboards: