turbot/aws_insights

Query: lambda_function_policy

Usage

powerpipe query aws_insights.query.lambda_function_policy

Steampipe Tables

SQL

select
p ->> 'Sid' as "Sid",
p ->> 'Effect' as "Effect",
p -> 'Principal' as "Principal",
p -> 'Action' as "Action",
p -> 'Resource' as "Resource"
from
aws_lambda_function,
jsonb_array_elements(policy_std -> 'Statement') as p
where
arn = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4);