turbot/aws_insights

Query: lambda_functions_for_cloudwatch_log_group

Usage

powerpipe query aws_insights.query.lambda_functions_for_cloudwatch_log_group

SQL

with filtered_log_group as (
select
name,
region,
account_id
from
aws_cloudwatch_log_group
where
arn = $1
and name like '/aws/lambda/%'
and region = split_part($1, ':', 4)
and account_id = split_part($1, ':', 5)
)
select
f.arn as lambda_function_arn
from
aws_lambda_function f
join
filtered_log_group efn on f.name = split_part(efn.name, '/', 4)
where
f.region = efn.region
and f.account_id = efn.account_id;